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

Petter Reinholdtsen pere at costa.debian.org
Sat Sep 16 09:16:32 UTC 2006


Author: pere
Date: 2006-09-16 09:16:32 +0000 (Sat, 16 Sep 2006)
New Revision: 932

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
Log:
  * Adjust checkroot.sh to create the root device node in /var/run/
    when needed, instead of mounting its own tmpfs.

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2006-09-16 09:03:26 UTC (rev 931)
+++ sysvinit/trunk/debian/changelog	2006-09-16 09:16:32 UTC (rev 932)
@@ -18,6 +18,8 @@
     Packages need to create the directories they expect to find in
     these directories from now on.  Patch from Scott James Remnant and
     Ubuntu.
+  * Adjust checkroot.sh to create the root device node in /var/run/
+    when needed, instead of mounting its own tmpfs.
 
  -- Petter Reinholdtsen <pere at debian.org>  Thu, 14 Sep 2006 15:13:40 +0200
 

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh	2006-09-16 09:03:26 UTC (rev 931)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh	2006-09-16 09:16:32 UTC (rev 932)
@@ -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 /tmp.
+	# fails we create a temporary node in /var/run.
 	#
 	if [ "$rootcheck" = yes ]
 	then
@@ -147,15 +147,12 @@
 			then
 				rootdev=/dev/root
 			else
-				# create a tmpfs for the device node
-				# to have some writable area this
-				# early in the boot.
 				if \
-				        domount tmpfs shmfs /tmp tmpfs \
-					&& mknod -m 600 /tmp/rootdev b ${rdev%:*} ${rdev#*:} \
-					&& [ -e /tmp/rootdev ]
+					rm -f /var/run/rootdev \
+					&& mknod -m 600 /var/run/rootdev b ${rdev%:*} ${rdev#*:} \
+					&& [ -e /var/run/rootdev ]
 				then
-					rootdev=/tmp/rootdev
+					rootdev=/var/run/rootdev
 				else
 					rootfatal=yes
 				fi
@@ -170,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 /tmp. 
+The system is also unable to create a temporary node in /var/run. 
 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."
@@ -372,11 +369,9 @@
 	fi
 
 	#
-	# umount the tmpfs mounted on /tmp if it was mounted in this script
+	# Remove /var/run/rootdev if we created it.
 	#
-	if [ /tmp/rootdev = "$rootdev" ] ; then
-		umount /tmp
-	fi
+	rm -f /var/run/rootdev
 }
 
 case "$1" in




More information about the Pkg-sysvinit-commits mailing list