[Lunar-commits] r14851 - brutus/trunk/moe
Moritz Heiber
moe at lunar-linux.org
Thu May 19 22:08:05 UTC 2005
Author: moe
Date: 2005-05-19 22:08:03 +0000 (Thu, 19 May 2005)
New Revision: 14851
Modified:
brutus/trunk/moe/mount
Log:
* Reworked the udev/devfs detection code a little
* Added two extra seconds when flushing the cache after
the swap umount since huge swap umounts might take at least
one second
* umount -L? You on dope nestu? ;-P
Modified: brutus/trunk/moe/mount
===================================================================
--- brutus/trunk/moe/mount 2005-05-19 21:45:39 UTC (rev 14850)
+++ brutus/trunk/moe/mount 2005-05-19 22:08:03 UTC (rev 14851)
@@ -135,21 +135,6 @@
echo -e ${RESULT_WARN}
}
-
-isInstalled()
-{
- echo -n " * Testing for ${1}:"
-
- if [ -e "${1}" ]; then
- echo -e ${RESULT_OK}
- return 0
- else
- echo -e ${RESULT_FAIL}
- return 1
- fi
-}
-
-
kernel_is_26()
{
# don't forget /proc has to be mounted before we do this!
@@ -196,16 +181,22 @@
# default bahaviour if there is no previous device nodes handling user choice
if [ -z "$DEVNODES" ]; then
- if kernel_is_26 && isInstalled "/sbin/udevstart" ; then
+ if kernel_is_26 && [ -x "/sbin/udevstart" ] ; then
DEVNODES="udev"
- elif isInstalled "/sbin/devfsd" ; then
- DEVNODES="devfs"
+ if [ ! -z ${DEBUG} ] ; then
+ echo -e "\n< Found udev >"
+ fi
+ elif [ -x "/sbin/devfsd" ] ; then
+ DEVNODES="devfs"
+ if [ ! -z ${DEBUG} ] ; then
+ echo -e "\n< No udev, using devfs >"
+ fi
else
warn_msg "* Assuming a static /dev :"
DEVNODES="static"
fi
fi
-
+
kernel_is_26 && run_with_msg " * Mounting sysfs : " "mount -t sysfs sysfs /sys"
if [ "$DEVNODES" = "devfs" ]; then
@@ -371,10 +362,10 @@
run_with_msg " * Deactivating swap space : " "swapoff -a"
- run_without_msg "sync; sync"
+ run_without_msg "sync; sync;" "2" # might take some time so we wait here for a couple of seconds
- if ! run_with_msg " * Remounting root readonly : " "mount -no remount,ro /" ; then
- if ! run_with_msg " * Trying again to remount root readonly : " "umount -L -O remount,ro /" "4" ; then
+ if ! run_with_msg " * Remounting root readonly : " "mount -n -o remount,ro /" ; then
+ if ! run_with_msg " * Trying again to remount root readonly : " "umount -l -O remount,ro /" "4" ; then
read -n 1 -t 30 -p "Do you want to login? (y/n) " CONFIRM
echo ""
case ${CONFIRM} in
More information about the Lunar-commits
mailing list