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

Thomas Hood jdthood-guest at costa.debian.org
Tue Dec 20 16:51:27 UTC 2005


Author: jdthood-guest
Date: 2005-12-20 16:51:26 +0000 (Tue, 20 Dec 2005)
New Revision: 425

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/bootmisc.sh
   sysvinit/trunk/debian/initscripts/etc/init.d/rmnologin
   sysvinit/trunk/debian/initscripts/postinst
Log:
Set up nologin symlink

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2005-12-20 14:21:47 UTC (rev 424)
+++ sysvinit/trunk/debian/changelog	2005-12-20 16:51:26 UTC (rev 425)
@@ -10,8 +10,12 @@
   * Use /proc/mounts instead of /etc/mtab when unmounting  (Closes: #338801)
   * Override lintian warnings re: top-level dirs
   * Check for files under mountpoints more thoroughly
-  * Don't fail to install on file-rc systems  (Closes: #343993)
-  * Don't fail to install in chroots  (Closes: #344089)
+  * initscripts.postinst:
+    + Don't fail to install on file-rc systems  (Closes: #343993)
+    + Don't fail to install in chroots  (Closes: #344089)
+    + Make /etc/nologin a symlink to /var/run/nologin so that the flag file
+      is no longer created on the root filesystem (when DELAYLOGIN=yes).
+      To switch on "nologin" permanently, replace /etc/nologin with a file.
   * mountvirtfs: Mount /dev/shm earlier; move long comment to README.Debian
   * Add 45_pidof_symlink.dpatch: Make pidof an absolute symlink
     (Closes: #343862)

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/bootmisc.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/bootmisc.sh	2005-12-20 14:21:47 UTC (rev 424)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/bootmisc.sh	2005-12-20 16:51:26 UTC (rev 425)
@@ -13,11 +13,18 @@
 . /lib/init/vars.sh
 
 do_start () {
-	# Put a nologin file in /etc to prevent people from logging in
-	# before system startup is complete.
-	if [ "$DELAYLOGIN" = yes ]
+	#
+	# If /etc/nologin is a symbolic link and login delaying is enabled
+	# then create the flag file which prevents logins before startup
+	# is complete
+	#
+	if [ -L /etc/nologin ]
 	then
-		echo "System bootup in progress - please wait" > /etc/nologin
+		case "$DELAYLOGIN" in
+		  Y*|y*)
+			echo "System bootup in progress - please wait" > /etc/nologin
+			;;
+		esac
 	fi
 
 	# Create /var/run/utmp so we can login.

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/rmnologin
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/rmnologin	2005-12-20 14:21:47 UTC (rev 424)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/rmnologin	2005-12-20 16:51:26 UTC (rev 425)
@@ -18,15 +18,18 @@
 . /lib/init/vars.sh
 
 do_start () {
-	case "$DELAYLOGIN" in
-	  Y*|y*)
-		#
-		# If /etc/nologin is a symbolic link
-		# then remove the destination instead of the link
-		#
-		rm -f "$(readlink -f /etc/nologin || :)"
-		;;
-	esac
+	#
+	# If /etc/nologin is a symbolic link and login delaying is enabled
+	# then remove the flag file (at the target of the symlink)
+	#
+	if [ -L /etc/nologin ]
+	then
+		case "$DELAYLOGIN" in
+		  Y*|y*)
+			rm -f "$(readlink -f /etc/nologin || :)"
+			;;
+		esac
+	fi
 }
 
 case "$1" in

Modified: sysvinit/trunk/debian/initscripts/postinst
===================================================================
--- sysvinit/trunk/debian/initscripts/postinst	2005-12-20 14:21:47 UTC (rev 424)
+++ sysvinit/trunk/debian/initscripts/postinst	2005-12-20 16:51:26 UTC (rev 425)
@@ -216,6 +216,11 @@
 done
 
 #
+# Set up nologin symlink
+#
+[ ! -L /etc/nologin ] && [ ! -e /etc/nologin ] && ln -s /var/run/nologin /etc/nologin
+
+#
 # Set up motd stuff
 #
 if [ ! -f /etc/motd.tail ]




More information about the Pkg-sysvinit-commits mailing list