summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rwxr-xr-xsh.Linux/init.sh10
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index cbe9106..4cc1f3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
18 Sep 2007; Roy Marples <uberlord@gentoo.org>:
+ Only mount /sys if it's not mounted, #192436.
+
API changes!
rc_ls_dir, rc_get_config and rc_get_list no longer take a starting list
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