aboutsummaryrefslogtreecommitdiffstats
path: root/main/mkinitfs/0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.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-fix-inittab-for-users-who-upgrades-from-pre-ope.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-fix-inittab-for-users-who-upgrades-from-pre-ope.patch')
-rw-r--r--main/mkinitfs/0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/main/mkinitfs/0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch b/main/mkinitfs/0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch
new file mode 100644
index 0000000000..a1bc1b36d4
--- /dev/null
+++ b/main/mkinitfs/0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch
@@ -0,0 +1,35 @@
+From 8da5b2ebf893af5710024e7111143f2521707647 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 2 May 2012 09:21:05 +0000
+Subject: [PATCH] init: fix inittab for users who upgrades from pre openrc
+
+The /etc/init.d/rc[SLK] have been replaced with openrc but users
+might have references to the old scripts in their /etc/inittab.
+
+We fix this from initramfs init.
+---
+ initramfs-init.in | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/initramfs-init.in b/initramfs-init.in
+index bec3b52..4425990 100755
+--- a/initramfs-init.in
++++ b/initramfs-init.in
+@@ -490,6 +490,14 @@ if [ -f "$ovl" ]; then
+ break;
+ fi
+ done
++
++ # fix up inittab from pre openrc times (alpine v1.8)
++ if [ -f "$sysroot"/etc/inittab ]; then
++ sed -i -e 's|:/etc/init.d/rcS|:/sbin/rc sysinit|' \
++ -e 's|:/etc/init.d/rcL|:/sbin/rc default|' \
++ -e 's|:/etc/init.d/rcK|:/sbin/rc shutdown|' \
++ "$sysroot"/etc/inittab
++ fi
+ else
+ # add some boot services by default
+ rc_add devfs sysinit
+--
+1.7.10
+