[Pkg-sysvinit-commits] r859 - in sysvinit/trunk/debian: .
initscripts/etc/init.d
Petter Reinholdtsen
pere at costa.debian.org
Fri Sep 8 06:28:13 UTC 2006
Author: pere
Date: 2006-09-08 06:28:13 +0000 (Fri, 08 Sep 2006)
New Revision: 859
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
Log:
Change checkroot.sh to use a private tmpfs file system for its
device file if it is missing from /dev/. (Closes: #386347)
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2006-09-07 20:46:31 UTC (rev 858)
+++ sysvinit/trunk/debian/changelog 2006-09-08 06:28:13 UTC (rev 859)
@@ -8,6 +8,8 @@
Oosting. (Closes: #386449).
* List 'udev' in the should-start section of mountdevsub.sh, to make
sure /dev/ is mounted.
+ * Change checkroot.sh to use a private tmpfs file system for its
+ device file if it is missing from /dev/. (Closes: #386347)
-- Petter Reinholdtsen <pere at debian.org> Thu, 7 Sep 2006 15:41:23 +0200
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh 2006-09-07 20:46:31 UTC (rev 858)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh 2006-09-08 06:28:13 UTC (rev 859)
@@ -17,6 +17,7 @@
. /lib/init/vars.sh
. /lib/lsb/init-functions
+. /lib/init/mount-functions.sh
do_start () {
#
@@ -144,12 +145,17 @@
then
rootdev=/dev/root
else
+ # Using lazy umount, only available
+ # from kernel 2.4.11, to create a
+ # private tmpfs for the device node.
if \
- rm -f /dev/shm/root \
- && mknod -m 600 /dev/shm/root b ${rdev%:*} ${rdev#*:} \
- && [ -e /dev/shm/root ]
+ domount tmpfs shmfs /tmp \
+ && cd /tmp \
+ && umount -l /tmp \
+ && mknod -m 600 rootdev b ${rdev%:*} ${rdev#*:} \
+ && [ -e rootdev ]
then
- rootdev=/dev/shm/root
+ rootdev=rootdev
else
rootfatal=yes
fi
@@ -162,6 +168,7 @@
#
if [ "$rootfatal" = yes ]
then
+ cd / # Release the private tmpfs system if we moved in there
log_failure_msg "The device node $rootdev for the root filesystem is missing or incorrect
or there is no entry for the root filesystem listed in /etc/fstab.
The system is also unable to create a temporary node in /dev/shm.
@@ -275,6 +282,7 @@
log_end_msg $FSCKCODE
fi
fi
+ cd / # Release the private tmpfs system if we moved in there
#
# If there was a failure, drop into single-user mode.
More information about the Pkg-sysvinit-commits
mailing list