summaryrefslogtreecommitdiffstats
path: root/slackware64-current/source/a/smartmontools
diff options
context:
space:
mode:
authorAdrien Nader <adrien@notk.org>2018-02-22 22:40:07 +0100
committerAdrien Nader <adrien@notk.org>2018-02-22 22:40:07 +0100
commit71b090cc669f5ce6f4f4151826ab8e905a9795f2 (patch)
tree19fc25e9178b4fc7869884961e331f6d2b86395c /slackware64-current/source/a/smartmontools
parent753b157a318aaaa6c6835e8af58d4ec3e3966317 (diff)
Thu Feb 22 19:36:43 UTC 2018
a/pkgtools-15.0-noarch-5.txz: Rebuilt. setup.services: add rc.smartd to setup menu. a/smartmontools-6.6-x86_64-2.txz: Rebuilt. Add rc.smartd init script. a/sysvinit-scripts-2.1-noarch-6.txz: Rebuilt. rc.M: start rc.smartd if it is executable. d/meson-0.44.1-x86_64-1.txz: Upgraded. l/system-config-printer-1.5.11-x86_64-2.txz: Rebuilt. Applied upstream patch to fix the auth dialog. n/postfix-3.3.0-x86_64-1.txz: Upgraded.
Diffstat (limited to 'slackware64-current/source/a/smartmontools')
-rw-r--r--slackware64-current/source/a/smartmontools/doinst.sh.gz2
-rw-r--r--slackware64-current/source/a/smartmontools/rc.smartd44
-rwxr-xr-xslackware64-current/source/a/smartmontools/smartmontools.SlackBuild13
3 files changed, 54 insertions, 5 deletions
diff --git a/slackware64-current/source/a/smartmontools/doinst.sh.gz b/slackware64-current/source/a/smartmontools/doinst.sh.gz
index aaf6ecece..0b489357d 100644
--- a/slackware64-current/source/a/smartmontools/doinst.sh.gz
+++ b/slackware64-current/source/a/smartmontools/doinst.sh.gz
@@ -1 +1 @@
-0939f12f8fa9fd01ace390a4f0918a8ace8e3e75
+a188486a389aaedfae2813cc402654879fb82e3e
diff --git a/slackware64-current/source/a/smartmontools/rc.smartd b/slackware64-current/source/a/smartmontools/rc.smartd
new file mode 100644
index 000000000..f0ad4f8cf
--- /dev/null
+++ b/slackware64-current/source/a/smartmontools/rc.smartd
@@ -0,0 +1,44 @@
+#!/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.
+
+smart_start() {
+ if [ -x /usr/sbin/smartd -a -r /etc/smartd.conf ]; then
+ echo "Starting smartd: /usr/sbin/smartd -p /run/smartd.pid &"
+ /usr/sbin/smartd -p /run/smartd.pid &
+ fi
+}
+
+smart_stop() {
+ 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
diff --git a/slackware64-current/source/a/smartmontools/smartmontools.SlackBuild b/slackware64-current/source/a/smartmontools/smartmontools.SlackBuild
index 9f88eca14..52d1a8053 100755
--- a/slackware64-current/source/a/smartmontools/smartmontools.SlackBuild
+++ b/slackware64-current/source/a/smartmontools/smartmontools.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2011, 2017 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2011, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,7 +22,7 @@
VERSION=${VERSION:-$(echo smartmontools-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -64,8 +64,13 @@ chown -R root:root .
make || exit 1
make install DESTDIR=$PKG || exit 1
-# Not used on Slackware:
-rm -rf $PKG/etc/rc.d
+# Don't use the included init script:
+rm -rf $PKG/etc/rc.d/*
+
+# Install the Slackware smartd init script:
+cp -a $CWD/rc.smartd $PKG/etc/rc.d/rc.smartd.new
+chown root:root $PKG/etc/rc.d/rc.smartd.new
+chmod 644 $PKG/etc/rc.d/rc.smartd.new
mv $PKG/etc/smartd.conf $PKG/etc/smartd.conf.new
gzip -9 $PKG/usr/man/man?/*.?