diff options
author | Roy Marples <roy@marples.name> | 2007-09-18 15:45:15 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-09-18 15:45:15 +0000 |
commit | 5ba4ad52e20de57509917494d22e7f43fb7b324b (patch) | |
tree | d0756503828828bac4a174272cc7e23418331af8 /sh.Linux/init.sh | |
parent | 81c009e47d3a0779cee32e2a90e5a479bbaa790e (diff) |
Only mount /sys if it's not mounted, #192436.
Diffstat (limited to 'sh.Linux/init.sh')
-rwxr-xr-x | sh.Linux/init.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sh.Linux/init.sh b/sh.Linux/init.sh index bc4fd9d7..ab93f23c 100755 --- a/sh.Linux/init.sh +++ b/sh.Linux/init.sh @@ -140,10 +140,12 @@ K26=$? if [ "${RC_UNAME}" != "GNU/kFreeBSD" -a "${RC_SYS}" != "VPS" -a "${K26}" = "0" ] ; then if [ -d /sys ] ; then - ebegin "Mounting sysfs at /sys" - mntcmd="$(fstabinfo --mountcmd /sys)" - try mount -n ${mntcmd:--t sysfs -o noexec,nosuid,nodev sysfs /sys} - eend $? + if ! mountinfo --quiet /sys ; then + ebegin "Mounting sysfs at /sys" + mntcmd="$(fstabinfo --mountcmd /sys)" + try mount -n ${mntcmd:--t sysfs -o noexec,nosuid,nodev sysfs /sys} + eend $? + fi else ewarn "No /sys to mount sysfs needed in 2.6 and later kernels!" fi |