> /usr/share/doc/hdparm/README.Debian mentions why hdparm does not run
> it's init script if the array is rebuilding.  I do not use software raid
> myself, so I am relying on reports from others.

I grepped this file for "raid", sorry that I didn't read it completely.

> I can add an environment variable to override these checks if you like -
> that way it won't run from init and blow up anyone's system
> non-interactively, but it would allow you to run it after boot up if you
> really wanted to.
>
> Would that satisfy?

That would be great. I would propose to have an /etc/default/hdparm. I have 
added the nessessary (/etc/default/hdparm and /etc/init.d/hdparm.diff) 
changes for this. I hope they will be helpful for you.

# default settings for hdparm
# this file is sourced from /etc/init.d/hdparm

# uncomment this if you really want to start hdparm even if md is not ok
# <perhaps some explanations why this is not enabled by default>
#DIRTYRAID=OK

# <other variables>
DISC=
DEFAULT=
OPTIONS=
DEF_QUIET=
OPT_QUIET=

*** hdparm.old	2005-03-13 19:57:05.605741776 +0100
--- hdparm	2005-03-13 20:35:15.308654024 +0100
***************
*** 1,5 ****
--- 1,14 ----
  #!/bin/sh
  
+ DISC=
+ DEFAULT=
+ OPTIONS=
+ DEF_QUIET=
+ OPT_QUIET=
+ DIRTYRAID=
+ 
+ test -f /etc/default/hdparm && . /etc/default/hdparm
+ 
  set -e
  
  case "$0" in
***************
*** 55,72 ****
    raidstat=`cat /proc/rd/status`
  fi
  
! if ! [ "$raidstat" = 'OK' ]; then
    report_error "RAID status not OK.  Exiting."
    exit 0
  fi
  
- echo -n "Setting parameters of disc:"
  
! DISC=
! DEFAULT=
! OPTIONS=
! DEF_QUIET=
! OPT_QUIET=
  
  set_option() {
    if test -n "$DISC"; then
--- 64,76 ----
    raidstat=`cat /proc/rd/status`
  fi
  
! if ! [[ "$raidstat" == 'OK' || "$DIRTYRAID" == 'OK' ]]; then
    report_error "RAID status not OK.  Exiting."
    exit 0
  fi
  
  
! echo -n "Setting parameters of disc:"
  
  set_option() {
    if test -n "$DISC"; then

Reply via email to