summaryrefslogtreecommitdiff
path: root/community/hdapsd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-05-14 01:18:40 -0700
committerroot <root@rshg054.dnsready.net>2013-05-14 01:18:40 -0700
commit2e5b72e5e8dfb5199a9b0da7c76d052a456662c2 (patch)
treefa055d4e2f367acb518de6c4e06b77b6d8cbef75 /community/hdapsd
parent66cb4a487ad73063c6b000279a5d5558fb7603f5 (diff)
Tue May 14 01:18:40 PDT 2013
Diffstat (limited to 'community/hdapsd')
-rw-r--r--community/hdapsd/PKGBUILD5
-rw-r--r--community/hdapsd/hdapsd.rc.d60
2 files changed, 1 insertions, 64 deletions
diff --git a/community/hdapsd/PKGBUILD b/community/hdapsd/PKGBUILD
index 74aa528f0..61c0d5d0d 100644
--- a/community/hdapsd/PKGBUILD
+++ b/community/hdapsd/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=hdapsd
pkgver=20090401
-pkgrel=5
+pkgrel=6
pkgdesc='HDAPS userspace hard drive protection daemon'
arch=('i686' 'x86_64')
url='http://sourceforge.net/projects/hdaps/'
@@ -13,12 +13,10 @@ depends=('glibc')
backup=('etc/conf.d/hdapsd')
source=("http://downloads.sourceforge.net/hdaps/hdapsd-${pkgver}.tar.gz"
'hdapsd.conf.d'
- 'hdapsd.rc.d'
'hdapsd.systemd'
'hdapsd.wrapper')
md5sums=('897cee8b0192febd127470f3e9506aeb'
'07fc036c8717bf5a38bbc269ed38ad19'
- '9ab70348da9751810a2bbac51e18ac75'
'4b1378d43dc9431982f6605265c24f3b'
'11270661f3a543268786a68bbe74a6bb')
@@ -36,7 +34,6 @@ package() {
# install rc script and its configuration file
install -Dm0644 "${srcdir}/hdapsd.conf.d" "${pkgdir}/etc/conf.d/hdapsd"
- install -Dm0755 "${srcdir}/hdapsd.rc.d" "${pkgdir}/etc/rc.d/hdapsd"
install -Dm0644 "${srcdir}/hdapsd.systemd" "${pkgdir}/usr/lib/systemd/system/hdapsd.service"
install -Dm0755 "${srcdir}/hdapsd.wrapper" "${pkgdir}/usr/sbin/hdapsd-wrapper"
}
diff --git a/community/hdapsd/hdapsd.rc.d b/community/hdapsd/hdapsd.rc.d
deleted file mode 100644
index f4e8a6b99..000000000
--- a/community/hdapsd/hdapsd.rc.d
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-
-[ -f /etc/conf.d/hdapsd ] && . /etc/conf.d/hdapsd
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PIDFILE=/var/run/hdapsd.pid
-PID=`cat ${PIDFILE} 2> /dev/null`
-
-case "$1" in
- start)
- stat_busy "Starting hdapsd"
-
- ## The daemon will try to autoload the kernel module
- #if [ ! -d /sys/devices/platform/hdaps ]; then
- # stat_fail
- # echo "You need to load the hdaps kernel module."
- # exit 1
- #fi
-
- ## Set up options to the hdapsd daemon
- HDAPSD_OPTS="-bp"
- if [ -z "${DEVICE}" ]; then
- HDAPSD_OPTS="${HDAPSD_OPTS} -d sda"
- else
- for i in ${DEVICE[@]}; do
- HDAPSD_OPTS="${HDAPSD_OPTS} -d ${i}"
- done
- fi
- [ ! -z "${SENSITIVITY}" ] && HDAPSD_OPTS="${HDAPSD_OPTS} -s ${SENSITIVITY}"
- [ "${ADAPTIVE}" = "yes" ] && HDAPSD_OPTS="${HDAPSD_OPTS} -a"
- [ "${SYSLOG}" = "yes" ] && HDAPSD_OPTS="${HDAPSD_OPTS} -l"
- [ "${FORCE}" = "yes" ] && HDAPSD_OPTS="${HDAPSD_OPTS} -f"
- [ -z "${PID}" ] && /usr/sbin/hdapsd ${HDAPSD_OPTS}
- if [ ${?} -gt 0 ]; then
- stat_fail
- else
- add_daemon hdapsd
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping hdapsd"
- [ ! -z "${PID}" ] && kill $PID &> /dev/null
- if [ ${?} -gt 0 ]; then
- stat_fail
- else
- rm_daemon hdapsd
- stat_done
- fi
- ;;
- restart)
- ${0} stop
- sleep 1
- ${0} start
- ;;
- *)
- echo "usage: ${0} {start|stop|restart}"
-esac