aboutsummaryrefslogtreecommitdiffstats
path: root/main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-05-02 12:04:59 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-05-02 12:06:31 +0000
commitd93650a8d51bc6b16e1935c615f1d951ffcc3f2e (patch)
tree5ee9ba3bc23e0185ed2e8da0449fe2af019d1874 /main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch
parent9ef32542c0f5f94bac8cb3e6fb3f76da7257b6d8 (diff)
downloadaports-d93650a8d51bc6b16e1935c615f1d951ffcc3f2e.tar.bz2
aports-d93650a8d51bc6b16e1935c615f1d951ffcc3f2e.tar.xz
main/mkinitfs: 2 fixes for init
- fix inittab for users that upgrade *really* old boxes (pre-openrc) - fix repositories detection to only happen after relocation
Diffstat (limited to 'main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch')
-rw-r--r--main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch b/main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch
new file mode 100644
index 0000000000..293ab3ea93
--- /dev/null
+++ b/main/mkinitfs/0001-init-search-boot-repositories-after-relocation.patch
@@ -0,0 +1,44 @@
+From 5da682acedf4011a647394843e819c50e8f5200b Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 2 May 2012 11:44:04 +0000
+Subject: [PATCH] init: search boot repositories after relocation
+
+---
+ initramfs-init.in | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/initramfs-init.in b/initramfs-init.in
+index 4425990..b14ebf9 100755
+--- a/initramfs-init.in
++++ b/initramfs-init.in
+@@ -84,6 +84,7 @@ unpack_apkovl() {
+ fi
+
+ # we need openssl. let apk handle deps
++ find_boot_repositories > /tmp/repositories
+ apk add --quiet --initdb --repositories-file /tmp/repositories openssl\
+ || return 1
+
+@@ -434,9 +435,6 @@ fi
+ retry_mount -o ro $mount_opts $ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1
+ eend $?
+
+-# generate apk repositories file
+-find_boot_repositories > /tmp/repositories
+-
+ # early console?
+ if [ "$SINGLEMODE" = "yes" ]; then
+ echo "Entering single mode. Type 'exit' to continue booting."
+@@ -543,6 +541,9 @@ pkgs="$pkgs alpine-base"
+ mkdir -p $sysroot/etc/apk/keys/
+ cp -a /etc/apk/keys $sysroot/etc/apk
+
++# generate apk repositories file. needs to be done after relocation
++find_boot_repositories > /tmp/repositories
++
+ # generate repo opts for apk
+ for i in $(cat /tmp/repositories); do
+ repo_opt="$repo_opt --repository $i"
+--
+1.7.10
+