mirror of
git://slackware.nl/current.git
synced 2024-12-28 09:59:53 +01:00
0be77b20da
a/lrzip-0.641-x86_64-1.txz: Upgraded. This update fixes the poor compression ratio reported by Toutatis. a/smartmontools-7.2-x86_64-4.txz: Rebuilt. Add support for /etc/default/smartd. Thanks to upnort. a/sysvinit-2.99-x86_64-1.txz: Upgraded. l/iso-codes-4.6.0-noarch-1.txz: Upgraded. n/ca-certificates-20210308-noarch-1.txz: Upgraded. This update provides the latest CA certificates to check for the authenticity of SSL connections. n/fetchmail-6.4.17-x86_64-1.txz: Upgraded. xfce/thunar-4.16.5-x86_64-1.txz: Upgraded.
50 lines
977 B
Bash
50 lines
977 B
Bash
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/rc.smartd
|
|
#
|
|
# Start/stop/restart the smartd daemon, which monitors the status of
|
|
# S.M.A.R.T. compatible hard drives and reports any problems.
|
|
#
|
|
# By default, smartd will scan for all ATA/SATA and SCSI/SAS hard drives
|
|
# and solid-state drives. Settings may be customized in /etc/smartd.conf.
|
|
|
|
# Import script defaults:
|
|
if [ -r /etc/default/smartd ]; then
|
|
. /etc/default/smartd
|
|
fi
|
|
|
|
smart_start() {
|
|
if [ -x /usr/sbin/smartd -a -r /etc/smartd.conf ]; then
|
|
echo "Starting smartd: /usr/sbin/smartd -p /run/smartd.pid $SMARTD_OPTIONS &"
|
|
/usr/sbin/smartd -p /run/smartd.pid $SMARTD_OPTIONS &
|
|
fi
|
|
}
|
|
|
|
smart_stop() {
|
|
echo "Stopping smartd."
|
|
if [ -r /run/smartd.pid ]; then
|
|
kill $(cat /run/smartd.pid)
|
|
else
|
|
killall smartd
|
|
fi
|
|
}
|
|
|
|
smart_restart() {
|
|
smart_stop
|
|
sleep 1
|
|
smart_start
|
|
}
|
|
|
|
case "$1" in
|
|
'start')
|
|
smart_start
|
|
;;
|
|
'stop')
|
|
smart_stop
|
|
;;
|
|
'restart')
|
|
smart_restart
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
esac
|