[Pkg-sysvinit-devel] Bug#697002: [PATCH initramfs-tools 4/5] init: Only mount /usr if the real init is systemd

Ben Hutchings ben at decadent.org.uk
Mon Sep 29 00:46:47 UTC 2014


initscripts doesn't work with /usr already mounted.  Other init
systems might not either.

Closes: #763157
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
 init | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/init b/init
index 670fabf..ca5926d 100755
--- a/init
+++ b/init
@@ -258,7 +258,8 @@ if ! validate_init "$init"; then
 	done
 fi
 
-if read_fstab_entry /usr; then
+# Mount /usr only if init is systemd (after reading symlink)
+if [ "${checktarget##*/}" = systemd ] && read_fstab_entry /usr; then
 	log_begin_msg "Mounting /usr file system"
 	mountfs /usr
 	log_end_msg


-- 
Ben Hutchings
Logic doesn't apply to the real world. - Marvin Minsky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20140929/0650f2cd/attachment.sig>


More information about the Pkg-sysvinit-devel mailing list