summaryrefslogtreecommitdiff
path: root/sh.Linux
diff options
context:
space:
mode:
Diffstat (limited to 'sh.Linux')
-rwxr-xr-xsh.Linux/init.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/sh.Linux/init.sh b/sh.Linux/init.sh
index bc4fd9d..ab93f23 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