[Pkg-sysvinit-commits] r942 - in sysvinit/trunk/debian: .
initscripts/etc/init.d
Petter Reinholdtsen
pere at costa.debian.org
Wed Sep 20 10:16:21 UTC 2006
Author: pere
Date: 2006-09-20 10:16:20 +0000 (Wed, 20 Sep 2006)
New Revision: 942
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh
sysvinit/trunk/debian/initscripts/etc/init.d/mtab.sh
sysvinit/trunk/debian/rules
Log:
Create /lib/init/rw/, and mount a tmpfs there to garantee some
writable area very early in the boot. Use this in checkroot.sh if
a device node need to be created.
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2006-09-20 10:11:57 UTC (rev 941)
+++ sysvinit/trunk/debian/changelog 2006-09-20 10:16:20 UTC (rev 942)
@@ -5,6 +5,9 @@
Remove code to convert to this feature when the package is
upgraded or installed. It will take effect after a reboot if
/etc/default/rcS is modified. Keep them disabled for now.
+ * Create /lib/init/rw/, and mount a tmpfs there to garantee some
+ writable area very early in the boot. Use this in checkroot.sh if
+ a device node need to be created.
-- Petter Reinholdtsen <pere at localhost> Tue, 19 Sep 2006 16:24:48 +0200
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh 2006-09-20 10:11:57 UTC (rev 941)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh 2006-09-20 10:16:20 UTC (rev 942)
@@ -135,7 +135,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 /var/run.
+ # fails we create a temporary node in /lib/init/rw.
#
if [ "$rootcheck" = yes ]
then
@@ -148,11 +148,11 @@
rootdev=/dev/root
else
if \
- rm -f /var/run/rootdev \
- && mknod -m 600 /var/run/rootdev b ${rdev%:*} ${rdev#*:} \
- && [ -e /var/run/rootdev ]
+ rm -f /lib/init/rw/rootdev \
+ && mknod -m 600 /lib/init/rw/rootdev b ${rdev%:*} ${rdev#*:} \
+ && [ -e /lib/init/rw/rootdev ]
then
- rootdev=/var/run/rootdev
+ rootdev=/lib/init/rw/rootdev
else
rootfatal=yes
fi
@@ -167,7 +167,7 @@
then
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 /var/run.
+The system is also unable to create a temporary node in /lib/init/rw.
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."
@@ -369,9 +369,9 @@
fi
#
- # Remove /var/run/rootdev if we created it.
+ # Remove /lib/init/rw/rootdev if we created it.
#
- rm -f /var/run/rootdev
+ rm -f /lib/init/rw/rootdev
}
case "$1" in
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh 2006-09-20 10:11:57 UTC (rev 941)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh 2006-09-20 10:16:20 UTC (rev 942)
@@ -40,6 +40,10 @@
domount tmpfs "" /var/lock varlock -omode=1777,nodev,noexec,nosuid
fi
+ # Get some writable area available before the root is checked
+ # and remounted.
+ domount tmpfs "" /lib/init/rw tmpfs -omode=0755,nosuid
+
#
# Mount usbfs/usbdevfs if /proc/bus/usb is present.
#
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mtab.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mtab.sh 2006-09-20 10:11:57 UTC (rev 941)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mtab.sh 2006-09-20 10:16:20 UTC (rev 942)
@@ -120,6 +120,7 @@
if [ yes = "$TMPLOCK" ] ; then
domtab tmpfs /var/lock "varlock" -omode=1777,nodev,noexec,nosuid
fi
+ domtab tmpfs /lib/init/rw tmpfs -omode=0755,nosuid
if [ -d /proc/bus/usb ]
then
domtab usbfs /proc/bus/usb "procbususb"
Modified: sysvinit/trunk/debian/rules
===================================================================
--- sysvinit/trunk/debian/rules 2006-09-20 10:11:57 UTC (rev 941)
+++ sysvinit/trunk/debian/rules 2006-09-20 10:16:20 UTC (rev 942)
@@ -168,6 +168,7 @@
install -d -o root -g root -m 755 $(tmp)/sys
endif
install -d -o root -g root -m 755 $(tmp)/lib/init
+ install -d -o root -g root -m 755 $(tmp)/lib/init/rw
install -d -o root -g root -m 755 $(tmp)/usr/share/initscripts
install -d -o root -g root -m 755 $(tmp)/var/lib/initscripts
install -d -o root -g root -m 755 $(tmp)/var/log/fsck
More information about the Pkg-sysvinit-commits
mailing list