--- branches/baselayout-1_12/sbin/rc (revision 3174) +++ branches/baselayout-1_12/sbin/rc (working copy) @@ -218,12 +218,10 @@ # make sure /proc/ isn't full of crap #291916 do_mnt=1 - if [[ -e /proc/uptime ]] ; then - if [[ $(stat / -c %d) == $(stat /proc -c %d) ]] ; then - ewarn "You have crap in your /proc/; please clean it; see #291916" - else - do_mnt=0 - fi + if is_mounted /proc proc; then + do_mnt=0 + elif ! is_clean /proc; then + ewarn "You have crap in your /proc/; please clean it; see #291916" fi if [[ ${do_mnt} == 1 ]] ; then @@ -236,7 +234,7 @@ try mount -n ${mntcmd:--t proc proc /proc -o noexec,nosuid,nodev} eend $? else - einfo "Skipping mount of /proc as /proc/uptime exists" + einfo "Skipping mount of /proc as /proc/mounts exists" fi # Start profiling init now we have /proc @@ -251,12 +249,10 @@ if [[ -d /sys ]] ; then # make sure /sys/ isn't full of crap #291916 do_mnt=1 - if [[ -e /sys/kernel ]] ; then - if [[ $(stat / -c %d) == $(stat /sys -c %d) ]] ; then - ewarn "You have crap in your /sys/; please clean it; see #291916" - else - do_mnt=0 - fi + if is_mounted /sys sys; then + do_mnt=0 + elif ! is_clean /sys; then + ewarn "You have crap in your /sys/; please clean it; see #291916" fi if [[ ${do_mnt} == 1 ]] ; then @@ -269,7 +265,7 @@ try mount -n ${mntcmd:--t sysfs sysfs /sys -o noexec,nosuid,nodev} eend $? else - einfo "Skipping mount of /sys as /sys/kernel exists" + einfo "Skipping mount of /sys as it's already mounted" fi else ewarn "No /sys to mount sysfs needed in 2.6 and later kernels!"