home: hub: mkinitfs

Download patch

ref: 8da5b2ebf893af5710024e7111143f2521707647
parent: c59e37886324ee1ba90511de38c83ea3a11841fd
author: Natanael Copa <ncopa@alpinelinux.org>
date: Wed May 2 04:21:05 CDT 2012

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.

--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -490,6 +490,14 @@
 			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