]> git.proxmox.com Git - mirror_smartmontools-debian.git/blobdiff - smartd.initd.in
New upstream version 6.6
[mirror_smartmontools-debian.git] / smartd.initd.in
index 7e0fe60c04d67805430109329e9f5496e64ffa85..dd5aedae72df428393efdc8db9766628f302cec0 100644 (file)
@@ -1,8 +1,8 @@
 #! /bin/sh
 
 # smartmontools init file for smartd
-# Copyright (C) 2002-8 Bruce Allen <smartmontools-support@lists.sourceforge.net>
-# $Id: smartd.initd.in 3360 2011-06-06 19:25:36Z chrfranke $
+# Copyright (C) 2002-8 Bruce Allen
+# $Id: smartd.initd.in 4431 2017-08-08 19:38:15Z chrfranke $
 
 # For RedHat and cousins:
 # chkconfig: 2345 40 40
@@ -27,8 +27,8 @@
 # Software Foundation; either version 2, or (at your option) any later
 # version. 
 # You should have received a copy of the GNU General Public License (for
-# example COPYING); if not, write to the Free Software Foundation, Inc., 675
-# Mass Ave, Cambridge, MA 02139, USA.
+# example COPYING); if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 # This code was originally developed as a Senior Thesis by Michael Cornwell
 # at the Concurrent Systems Laboratory (now part of the Storage Systems
 # Research Center), Jack Baskin School of Engineering, University of
@@ -45,7 +45,7 @@ report_unsupported () {
     echo "Currently the smartmontools package has no init script for"
     echo "the $1 OS/distribution. If you can provide one or this"
     echo "one works after removing some ifdefs, please contact"
-    echo "smartmontools-support@lists.sourceforge.net."
+    echo "smartmontools-support@listi.jpberlin.de."
     exit 1
 }
 
@@ -147,7 +147,7 @@ if [ -f /etc/redhat-release -o -f /etc/yellowdog-release -o -f /etc/mandrake-rel
 elif [ -f /etc/slackware-version ] ; then
 
     # Source configuration file.  This should define the shell variable smartd_opts.
-    # Email smartmontools-support@lists.sourceforge.net if there is a better choice
+    # Email smartmontools-support mailing list if there is a better choice
     # of path for Slackware.
 
     [ -r /etc/sysconfig/smartmontools ] && . /etc/sysconfig/smartmontools
@@ -227,6 +227,15 @@ elif [ -f /etc/SuSE-release ] ; then
     if test -n "$SMARTD_DRIVEDB" ; then
        smartd_opts="$smartd_opts -B $SMARTD_DRIVEDB"
     fi
+    if test "$SMARTD_SAVESTATES" = "no" ; then
+       smartd_opts="$smartd_opts -s \"\""
+    fi
+    if test "$SMARTD_ATTRLOG" = "no" ; then
+       smartd_opts="$smartd_opts -A \"\""
+    fi
+    if test -n "$SMARTD_EXTRA_OPTS" ; then
+       smartd_opts="$smartd_opts $SMARTD_EXTRA_OPTS"
+    fi
 
     # Shell functions sourced from /etc/rc.status:
     #      rc_check         check and set local and overall rc status
@@ -269,7 +278,7 @@ elif [ -f /etc/SuSE-release ] ; then
 
            # We don't use startproc - we need to check for return code 17.
            if ! /sbin/checkproc $SMARTD_BIN ; then
-               $SMARTD_BIN $smartd_opts
+               eval $SMARTD_BIN$smartd_opts
                # Remember status and be verbose
                if test $? -ne 17 ; then
                    rc_status -v
@@ -485,7 +494,7 @@ elif uname -a | grep FreeBSD > /dev/null 2>&1 ; then
 elif uname -a | grep SunOS > /dev/null 2>&1 ; then
 
     # Source configuration file.  This should define the shell variable smartd_opts.
-    # Email smartmontools-support@lists.sourceforge.net if there is a better choice
+    # Email smartmontools-support mailing list if there is a better choice
     # of path for Solaris
 
     [ -r /etc/default/smartmontools ] && . /etc/default/smartmontools
@@ -531,10 +540,10 @@ elif uname | grep -i CYGWIN > /dev/null 2>&1 ; then
 Controls and monitors storage devices using the Self-Monitoring \
 Analysis and Reporting Technology System (S.M.A.R.T.) \
 built into ATA and SCSI Hard Drives. \
-http://smartmontools.sourceforge.net/"
+http://www.smartmontools.org/"
 
     # Source configuration file.  This should define the shell variable smartd_opts.
-    # Email smartmontools-support@lists.sourceforge.net if there is a better choice
+    # Email smartmontools-support mailing list if there is a better choice
     # of path for Cygwin
 
     [ -r /etc/sysconfig/smartmontools ] && . /etc/sysconfig/smartmontools
@@ -649,5 +658,5 @@ fi
 # One should NEVER arrive here, except for a badly written case above,
 # that fails to exit.
 echo "SOMETHING IS WRONG WITH THE SMARTD STARTUP SCRIPT"
-echo "PLEASE CONTACT smartmontools-support@lists.sourceforge.net"
+echo "PLEASE CONTACT smartmontools-support@listi.jpberlin.de"
 exit 1