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

Thomas Hood jdthood-guest at costa.debian.org
Sat Dec 31 12:50:16 UTC 2005


Author: jdthood-guest
Date: 2005-12-31 12:50:15 +0000 (Sat, 31 Dec 2005)
New Revision: 470

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
   sysvinit/trunk/debian/initscripts/etc/init.d/umountroot
Log:
Remount ro with -f option on GNU/kFreeBSD

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2005-12-31 11:36:32 UTC (rev 469)
+++ sysvinit/trunk/debian/changelog	2005-12-31 12:50:15 UTC (rev 470)
@@ -8,6 +8,7 @@
   * urandom: Add PATH so that find can be found  (Closes: #345273)
   * init: 64_init_set_PATH: Set PATH if unset on reload
     (Closes: #345370)
+  * Remount ro with -f on GNU/kFreeBSD  (Closes: #344547)
 
   [ Petter Reinholdtsen ]
   * sysv-rc: Fix some typos in the startpar handling.  (Closes: #345269)

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh	2005-12-31 11:36:32 UTC (rev 469)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh	2005-12-31 12:50:15 UTC (rev 470)
@@ -228,8 +228,10 @@
 		#
 		# As a compromise we try both.
 		#
-		if ! mount -n -o remount,ro $rootdev / 2>/dev/null &&
-		   ! mount -n -o remount,ro /
+		if \
+			! mount    -n -o remount,ro              $rootdev /              \
+			&& ! mount -n -o remount,ro -t dummytype $rootdev /  2>/dev/null \
+			&& ! mount -n -o remount,ro                       /  2>/dev/null
 		then
 			log_failure_msg "Cannot check root file system because it is not mounted read-only."
 			rootcheck=no

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/umountroot
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/umountroot	2005-12-31 11:36:32 UTC (rev 469)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/umountroot	2005-12-31 12:50:15 UTC (rev 470)
@@ -15,10 +15,15 @@
 
 do_stop () {
 	[ "$VERBOSE" != no ] && log_action_begin_msg "Mounting root filesystem read-only"
+	MOUNT_FORCE_OPT=
+	[ "$(uname -s)" = "GNU/kFreeBSD" ] && MOUNT_FORCE_OPT=-f
 	# This:
 	#     mount -n -o remount,ro /
-	# will act on a bind mount of / if there is one.  See #339023.
-	mount -n -o remount,ro -t dummy dummy /
+	# will act on a bind mount of / if there is one.
+	# See #339023 and the comment in checkroot.sh
+	mount    $MOUNT_FORCE_OPT -n -o remount,ro -t dummytype dummydev /             \
+	|| mount $MOUNT_FORCE_OPT -n -o remount,ro              dummydev / 2>/dev/null \
+	|| mount $MOUNT_FORCE_OPT -n -o remount,ro                       / 2>/dev/null
 	ES=$?
 	[ "$VERBOSE" != no ] && log_action_end_msg $ES
 }




More information about the Pkg-sysvinit-commits mailing list