[Pkg-sysvinit-commits] r1282 - in sysvinit/trunk/debian: . initscripts/etc/init.d

pere at alioth.debian.org pere at alioth.debian.org
Thu May 29 17:52:24 UTC 2008


Author: pere
Date: 2008-05-29 17:52:23 +0000 (Thu, 29 May 2008)
New Revision: 1282

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/umountroot
Log:
  * Make sure a few essential directories (/proc, /sys, /var/{run,lock}) is
    created in init.d/umountroot if missing, right before mounting root r/o.
    It is a convenient (and one of the very few possible) place to ensure that
    the next boot will succeed (Closes: #483393).  Patch from Martin Pitt
    and Ubuntu.

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2008-05-29 17:47:53 UTC (rev 1281)
+++ sysvinit/trunk/debian/changelog	2008-05-29 17:52:23 UTC (rev 1282)
@@ -5,6 +5,11 @@
   * Repair eliminate_conffile() in initscripts preinst, making sure
     unchanged conffiles are properly handled (Closes: #483391).
     Patch from Martin Pitt and Ubuntu.
+  * Make sure a few essential directories (/proc, /sys, /var/{run,lock}) is
+    created in init.d/umountroot if missing, right before mounting root r/o.
+    It is a convenient (and one of the very few possible) place to ensure that
+    the next boot will succeed (Closes: #483393).  Patch from Martin Pitt
+    and Ubuntu.
 
  -- Petter Reinholdtsen <pere at debian.org>  Thu, 29 May 2008 19:42:06 +0200
 

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/umountroot
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/umountroot	2008-05-29 17:47:53 UTC (rev 1281)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/umountroot	2008-05-29 17:52:23 UTC (rev 1282)
@@ -16,6 +16,14 @@
 
 do_stop () {
 	[ "$VERBOSE" = no ] || log_action_begin_msg "Mounting root filesystem read-only"
+	# These directories must exist on the root filesystem as they are
+	# targets for system mountpoints.  We've just unmounted all other
+	# filesystems, so either they are mounted now (in which case the
+	# mount point exists) or we can make the mountpoint.
+	for dir in /proc /sys /var/run /var/lock; do
+	    mkdir -p $dir || true
+	done
+
 	MOUNT_FORCE_OPT=
 	[ "$(uname -s)" = "GNU/kFreeBSD" ] && MOUNT_FORCE_OPT=-f
 	# This:




More information about the Pkg-sysvinit-commits mailing list