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

Closes: #763157
Signed-off-by: Ben Hutchings <b...@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

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to