[Pkg-sysvinit-commits] r1055 - in sysvinit/branches/libata-fixes/debian: . initscripts/etc/default initscripts/etc/init.d

hmh at alioth.debian.org hmh at alioth.debian.org
Sat Jun 9 14:27:13 UTC 2007


Author: hmh
Date: 2007-06-09 14:27:13 +0000 (Sat, 09 Jun 2007)
New Revision: 1055

Modified:
   sysvinit/branches/libata-fixes/debian/changelog
   sysvinit/branches/libata-fixes/debian/initscripts/etc/default/halt
   sysvinit/branches/libata-fixes/debian/initscripts/etc/init.d/halt
Log:
* init.d/halt, default/halt: add HDDOWN option to override initscript halt -h logic


Modified: sysvinit/branches/libata-fixes/debian/changelog
===================================================================
--- sysvinit/branches/libata-fixes/debian/changelog	2007-06-09 13:41:40 UTC (rev 1054)
+++ sysvinit/branches/libata-fixes/debian/changelog	2007-06-09 14:27:13 UTC (rev 1055)
@@ -4,8 +4,10 @@
     Check http://linux-ata.org/shutdown.html for information
     * init.d/halt: do not issue -h to halt(8) when the kernel supports
       auto-shutdown
+    * init.d/halt, default/halt: add HDDOWN option to override initscript
+      halt -h logic
 
- -- Henrique de Moraes Holschuh <hmh at debian.org>  Sat,  9 Jun 2007 10:17:38 -0300
+ -- Henrique de Moraes Holschuh <hmh at debian.org>  Sat,  9 Jun 2007 11:26:20 -0300
 
 sysvinit (2.86.ds1-38) unstable; urgency=medium
 

Modified: sysvinit/branches/libata-fixes/debian/initscripts/etc/default/halt
===================================================================
--- sysvinit/branches/libata-fixes/debian/initscripts/etc/default/halt	2007-06-09 13:41:40 UTC (rev 1054)
+++ sysvinit/branches/libata-fixes/debian/initscripts/etc/default/halt	2007-06-09 14:27:13 UTC (rev 1055)
@@ -1,2 +1,12 @@
 # Default behaviour of shutdown -h / halt. Set to "halt" or "poweroff".
 HALT=poweroff
+
+# Should we try to spin down disks?  Note that a new enough kernel can override
+# this, and that disks are best spun down by the kernel, not by halt(8).
+# See http://linux-ata.org/shutdown.html
+#
+# Set HDDOWN to "NEVER" to not use the -h halt(8) option, or to "ALWAYS" to
+# always use the -h halt(8) option.  Leave it undefined to let the initscript
+# decide for itself.
+#HDDOWN=NEVER
+#HDDOWN=ALWAYS

Modified: sysvinit/branches/libata-fixes/debian/initscripts/etc/init.d/halt
===================================================================
--- sysvinit/branches/libata-fixes/debian/initscripts/etc/init.d/halt	2007-06-09 13:41:40 UTC (rev 1054)
+++ sysvinit/branches/libata-fixes/debian/initscripts/etc/init.d/halt	2007-06-09 14:27:13 UTC (rev 1055)
@@ -42,12 +42,17 @@
 
 	# Don't shut down drives if we're using RAID, or if the kernel can
 	# do it properly by itself, see http://linux-ata.org/shutdown.html
+	#
+	# Allow the user to override it in the default file, however
 	hddown="-h"
-	if grep -qs '^md.*active' /proc/mdstat || \
+	if [ "$HDDOWN" = "NEVER" ] || grep -qs '^md.*active' /proc/mdstat || \
 	   ls -1 /sys/class/scsi_disk/*/manage_start_stop >/dev/null 2>&1
 	then
 		hddown=""
 	fi
+	if [ "$HDDOWN" = "ALWAYS" ]; then
+		hddown="-h"
+	fi
 
 	# If INIT_HALT=HALT don't poweroff.
 	poweroff="-p"




More information about the Pkg-sysvinit-commits mailing list