From hmh at alioth.debian.org Sat Jun 9 13:40:46 2007 From: hmh at alioth.debian.org (hmh at alioth.debian.org) Date: Sat, 09 Jun 2007 13:40:46 +0000 Subject: [Pkg-sysvinit-commits] r1053 - sysvinit/branches Message-ID: Author: hmh Date: 2007-06-09 13:40:46 +0000 (Sat, 09 Jun 2007) New Revision: 1053 Added: sysvinit/branches/libata-fixes/ Log: Branch for sysvinit fixes for the scsi/libata device shutdown issues Copied: sysvinit/branches/libata-fixes (from rev 1052, sysvinit/trunk) From hmh at alioth.debian.org Sat Jun 9 13:41:40 2007 From: hmh at alioth.debian.org (hmh at alioth.debian.org) Date: Sat, 09 Jun 2007 13:41:40 +0000 Subject: [Pkg-sysvinit-commits] r1054 - in sysvinit/branches/libata-fixes/debian: . initscripts/etc/init.d Message-ID: Author: hmh Date: 2007-06-09 13:41:40 +0000 (Sat, 09 Jun 2007) New Revision: 1054 Modified: sysvinit/branches/libata-fixes/debian/changelog sysvinit/branches/libata-fixes/debian/initscripts/etc/init.d/halt Log: * init.d/halt: do not issue -h to halt(8) when the kernel supports auto-shutdown Modified: sysvinit/branches/libata-fixes/debian/changelog =================================================================== --- sysvinit/branches/libata-fixes/debian/changelog 2007-06-09 13:40:46 UTC (rev 1053) +++ sysvinit/branches/libata-fixes/debian/changelog 2007-06-09 13:41:40 UTC (rev 1054) @@ -1,3 +1,12 @@ +sysvinit (2.86.ds1-39) UNRELEASED; urgency=low + + * libata shutdown handling fixes: + 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 + + -- Henrique de Moraes Holschuh Sat, 9 Jun 2007 10:17:38 -0300 + sysvinit (2.86.ds1-38) unstable; urgency=medium * Medium urgency as it solve an RC bug in etch. 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:40:46 UTC (rev 1053) +++ sysvinit/branches/libata-fixes/debian/initscripts/etc/init.d/halt 2007-06-09 13:41:40 UTC (rev 1054) @@ -40,9 +40,11 @@ /etc/init.d/ups-monitor poweroff fi - # Don't shut down drives if we're using RAID. + # 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 hddown="-h" - if grep -qs '^md.*active' /proc/mdstat + if grep -qs '^md.*active' /proc/mdstat || \ + ls -1 /sys/class/scsi_disk/*/manage_start_stop >/dev/null 2>&1 then hddown="" fi From hmh at alioth.debian.org Sat Jun 9 14:27:13 2007 From: hmh at alioth.debian.org (hmh at alioth.debian.org) Date: Sat, 09 Jun 2007 14:27:13 +0000 Subject: [Pkg-sysvinit-commits] r1055 - in sysvinit/branches/libata-fixes/debian: . initscripts/etc/default initscripts/etc/init.d Message-ID: 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 Sat, 9 Jun 2007 10:17:38 -0300 + -- Henrique de Moraes Holschuh 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" From hmh at alioth.debian.org Sat Jun 9 14:38:30 2007 From: hmh at alioth.debian.org (hmh at alioth.debian.org) Date: Sat, 09 Jun 2007 14:38:30 +0000 Subject: [Pkg-sysvinit-commits] r1056 - in sysvinit/branches/libata-fixes/debian: . initscripts/man Message-ID: Author: hmh Date: 2007-06-09 14:38:30 +0000 (Sat, 09 Jun 2007) New Revision: 1056 Added: sysvinit/branches/libata-fixes/debian/initscripts/man/halt.5 Modified: sysvinit/branches/libata-fixes/debian/changelog sysvinit/branches/libata-fixes/debian/rules Log: * Add halt(5) manpage, updated for HDDOWN. Thanks to Casper Gielen for the manpage. (Closes: #407211) Modified: sysvinit/branches/libata-fixes/debian/changelog =================================================================== --- sysvinit/branches/libata-fixes/debian/changelog 2007-06-09 14:27:13 UTC (rev 1055) +++ sysvinit/branches/libata-fixes/debian/changelog 2007-06-09 14:38:30 UTC (rev 1056) @@ -6,8 +6,10 @@ auto-shutdown * init.d/halt, default/halt: add HDDOWN option to override initscript halt -h logic + * Add halt(5) manpage, updated for HDDOWN. Thanks to Casper Gielen for + the manpage. (Closes: #407211) - -- Henrique de Moraes Holschuh Sat, 9 Jun 2007 11:26:20 -0300 + -- Henrique de Moraes Holschuh Sat, 9 Jun 2007 11:29:42 -0300 sysvinit (2.86.ds1-38) unstable; urgency=medium Added: sysvinit/branches/libata-fixes/debian/initscripts/man/halt.5 =================================================================== --- sysvinit/branches/libata-fixes/debian/initscripts/man/halt.5 (rev 0) +++ sysvinit/branches/libata-fixes/debian/initscripts/man/halt.5 2007-06-09 14:38:30 UTC (rev 1056) @@ -0,0 +1,58 @@ +.TH halt 5 "16 Jan 2007" "" "File Formats" +.SH NAME +halt \- variables that affect the behavior of the shutdown scripts +.SH DESCRIPTION +The +.I /etc/default/halt +file contains variable settings in POSIX format: +.IP "" .5i +VAR=VAL +.PP +Only one assignment is allowed per line. +Comments (starting with '#') are also allowed. + +.SH OPTIONS +The following variables can be set. + +.IP \fBHALT\fP +If set to +.B poweroff +the system will be powered down after it has been +brought down. This is the default. +.br +If set to +.B halt +the system will only be halted after it has been brought +down. What exactly this means depends on your hardware. + +.IP \fBNETDOWN\fB +Setting this to +.B no +prevents shutdown from shutting down the network intefaces. +This is necessary to use Wake-On-Lan. +Setting it to +.B yes +causes shutdown to also bring down the network interfaces (and +thus prevent the machine from being woken up remotely). + +.IP \fBHDDOWN\fB +Setting this to +.B NEVER +prevents /etc/init.d/halt from issuing halt -h. +Setting it to +.B ALWAYS +makes /etc/init.d/halt always issue halt -h. +Leave it undefined to let the initscript decide by itself. + +.SH SEE ALSO +.BR halt "(8), " shutdown "(8)." + +.SH AUTHOR +\fBCasper Gielen\fR <\&casper at gielen.name\&> + +.SH "COPYRIGHT" +This manual page is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. +.PP +This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +.PP +You should have received a copy of the GNU General Public License along with this manual page; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111\-1307 USA Modified: sysvinit/branches/libata-fixes/debian/rules =================================================================== --- sysvinit/branches/libata-fixes/debian/rules 2007-06-09 14:27:13 UTC (rev 1055) +++ sysvinit/branches/libata-fixes/debian/rules 2007-06-09 14:38:30 UTC (rev 1056) @@ -202,6 +202,8 @@ $(tmp)/sbin/fsck.nfs install -o root -g root -m 644 debian/initscripts/man/fsck.nfs.8 \ $(tmp)/usr/share/man/man8/fsck.nfs.8 + install -o root -g root -m 644 debian/initscripts/man/halt.5 \ + $(tmp)/usr/share/man/man5/halt.5 install -o root -g root -m 644 debian/initscripts/rcS.5 \ $(tmp)/usr/share/man/man5 install -o root -g root -m 755 src/mountpoint $(tmp)/bin