Only mount /sys if it's not mounted, #192436.

This commit is contained in:
Roy Marples
2007-09-18 15:45:15 +00:00
parent 81c009e47d
commit 5ba4ad52e2
2 changed files with 8 additions and 4 deletions

View File

@ -3,6 +3,8 @@
18 Sep 2007; Roy Marples <uberlord@gentoo.org>: 18 Sep 2007; Roy Marples <uberlord@gentoo.org>:
Only mount /sys if it's not mounted, #192436.
API changes! API changes!
rc_ls_dir, rc_get_config and rc_get_list no longer take a starting list rc_ls_dir, rc_get_config and rc_get_list no longer take a starting list

View File

@ -140,10 +140,12 @@ K26=$?
if [ "${RC_UNAME}" != "GNU/kFreeBSD" -a "${RC_SYS}" != "VPS" -a "${K26}" = "0" ] ; then if [ "${RC_UNAME}" != "GNU/kFreeBSD" -a "${RC_SYS}" != "VPS" -a "${K26}" = "0" ] ; then
if [ -d /sys ] ; then if [ -d /sys ] ; then
ebegin "Mounting sysfs at /sys" if ! mountinfo --quiet /sys ; then
mntcmd="$(fstabinfo --mountcmd /sys)" ebegin "Mounting sysfs at /sys"
try mount -n ${mntcmd:--t sysfs -o noexec,nosuid,nodev sysfs /sys} mntcmd="$(fstabinfo --mountcmd /sys)"
eend $? try mount -n ${mntcmd:--t sysfs -o noexec,nosuid,nodev sysfs /sys}
eend $?
fi
else else
ewarn "No /sys to mount sysfs needed in 2.6 and later kernels!" ewarn "No /sys to mount sysfs needed in 2.6 and later kernels!"
fi fi