init: Only mount /usr if the real init is systemd

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

Closes: #763157
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Ben Hutchings 2014-09-28 23:42:03 +01:00
parent 66a141e43e
commit 042d7a3fa1

3
init
View File

@ -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