[Pkg-sysvinit-commits] r894 - in sysvinit/trunk/debian: .
initscripts/etc/init.d
Petter Reinholdtsen
pere at costa.debian.org
Sat Sep 9 17:09:59 UTC 2006
Author: pere
Date: 2006-09-09 17:09:59 +0000 (Sat, 09 Sep 2006)
New Revision: 894
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
Log:
* Rewrite checkroot.sh to not use lazy umount to drop the private
tmpfs, and keep the tmpfs mounted on /tmp/ while checkroot.sh is
executing. It seem that fsck did not like relative device
paths. (Closes: #386347, #386699)
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2006-09-09 09:29:55 UTC (rev 893)
+++ sysvinit/trunk/debian/changelog 2006-09-09 17:09:59 UTC (rev 894)
@@ -4,6 +4,10 @@
from the update-rc.d problem. Add script
/usr/share/doc/sysv-rc/update-rc.d-recover to make it easier for
people to recover.(Closes: #386649)
+ * Rewrite checkroot.sh to not use lazy umount to drop the private
+ tmpfs, and keep the tmpfs mounted on /tmp/ while checkroot.sh is
+ executing. It seem that fsck did not like relative device
+ paths. (Closes: #386347, #386699)
* LSB header updates:
- umountfs should execute before umountroot, not before halt or
reboot.
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh 2006-09-09 09:29:55 UTC (rev 893)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh 2006-09-09 17:09:59 UTC (rev 894)
@@ -133,7 +133,7 @@
#
# Does the root device in /etc/fstab match with the actual device ?
# If not we try to use the /dev/root alias device, and if that
- # fails we create a temporary node in /dev/shm.
+ # fails we create a temporary node in /tmp.
#
if [ "$rootcheck" = yes ]
then
@@ -145,17 +145,15 @@
then
rootdev=/dev/root
else
- # Using lazy umount, only available
- # from kernel 2.4.11, to create a
- # private tmpfs for the device node.
+ # create a tmpfs for the device node
+ # to have some writable area this
+ # early in the boot.
if \
domount tmpfs shmfs /tmp \
- && cd /tmp \
- && umount -l /tmp \
- && mknod -m 600 rootdev b ${rdev%:*} ${rdev#*:} \
- && [ -e rootdev ]
+ && mknod -m 600 /tmp/rootdev b ${rdev%:*} ${rdev#*:} \
+ && [ -e /tmp/rootdev ]
then
- rootdev=rootdev
+ rootdev=/tmp/rootdev
else
rootfatal=yes
fi
@@ -168,10 +166,9 @@
#
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.
+The system is also unable to create a temporary node in /tmp.
This means you have to fix the problem manually."
log_warning_msg "A maintenance shell will now be started.
CONTROL-D will terminate this shell and restart the system."
@@ -282,7 +279,6 @@
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.
@@ -374,9 +370,11 @@
fi
#
- # Remove /dev/shm/root if we created it.
+ # umount the tmpfs mounted on /tmp if it was mounted in this script
#
- rm -f /dev/shm/root
+ if [ /tmp/rootdev = "$rootdev" ] ; then
+ umount /tmp
+ fi
}
case "$1" in
More information about the Pkg-sysvinit-commits
mailing list