diff options
Diffstat (limited to 'community/hdapsd')
-rw-r--r-- | community/hdapsd/PKGBUILD | 21 | ||||
-rw-r--r-- | community/hdapsd/hdapsd.conf.d | 22 | ||||
-rw-r--r-- | community/hdapsd/hdapsd.rc.d | 60 | ||||
-rw-r--r-- | community/hdapsd/hdapsd.systemd | 2 | ||||
-rw-r--r-- | community/hdapsd/hdapsd.wrapper | 20 |
5 files changed, 6 insertions, 119 deletions
diff --git a/community/hdapsd/PKGBUILD b/community/hdapsd/PKGBUILD index 7d8b4922f..5fcb53a3d 100644 --- a/community/hdapsd/PKGBUILD +++ b/community/hdapsd/PKGBUILD @@ -4,28 +4,21 @@ pkgname=hdapsd pkgver=20090401 -pkgrel=5 +pkgrel=7 pkgdesc='HDAPS userspace hard drive protection daemon' arch=('i686' 'x86_64' 'mips64el') url='http://sourceforge.net/projects/hdaps/' license=('GPL') -depends=('glibc') -backup=('etc/conf.d/hdapsd') +depends=('glibc' 'bash') source=("http://downloads.sourceforge.net/hdaps/hdapsd-${pkgver}.tar.gz" - 'hdapsd.conf.d' - 'hdapsd.rc.d' - 'hdapsd.systemd' - 'hdapsd.wrapper') + 'hdapsd.systemd') md5sums=('897cee8b0192febd127470f3e9506aeb' - '07fc036c8717bf5a38bbc269ed38ad19' - '9ab70348da9751810a2bbac51e18ac75' - '4b1378d43dc9431982f6605265c24f3b' - '11270661f3a543268786a68bbe74a6bb') + '61ac40d4d77e57863da68d9fd94c58e7') build() { cd "${srcdir}/${pkgname}-${pkgver}" - ./configure --prefix=/usr --sysconfdir=/etc + ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin make ${MAKEFLAGS} } @@ -34,9 +27,5 @@ package() { make DESTDIR="${pkgdir}/" install - # 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.conf.d b/community/hdapsd/hdapsd.conf.d deleted file mode 100644 index eb99fdc2c..000000000 --- a/community/hdapsd/hdapsd.conf.d +++ /dev/null @@ -1,22 +0,0 @@ -# DEVICE specifies the device to monitor, defaults to "sda". -#DEVICE='sda' - -# If an ultrabay hard drive is inserted, the following can be used: -#DEVICE=('sda' 'sdb') - -# SENSITIVITY is self explanatory, defaults to "15". -#SENSITIVITY='15' - -# Set ADAPTIVE to "yes" to enable adaptive threshold (automatically increase -# when the built-in keyboard/mouse is used). -#ADAPTIVE='yes' - -# Set SYSLOG to "yes" to have the daemon report errors to syslog (instead of -# stderr/stdout). -SYSLOG='yes' - -# Set FORCE to "yes" to force the kernel to use the unload heads feature on -# some old hard drives for which support cannot be autodetected (don't use this -# unless you're absolutely sure your hard drive really supports unloading -# heads). -#FORCE='yes' 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 diff --git a/community/hdapsd/hdapsd.systemd b/community/hdapsd/hdapsd.systemd index 328699bc7..d3927d61e 100644 --- a/community/hdapsd/hdapsd.systemd +++ b/community/hdapsd/hdapsd.systemd @@ -5,7 +5,7 @@ After=syslog.target [Service] Type=forking PIDFile=/var/run/hdapsd.pid -ExecStart=/usr/sbin/hdapsd-wrapper +ExecStart=/usr/bin/hdapsd-wrapper ExecReload=/bin/kill -HUP ${MAINPID} [Install] diff --git a/community/hdapsd/hdapsd.wrapper b/community/hdapsd/hdapsd.wrapper deleted file mode 100644 index d74fd272d..000000000 --- a/community/hdapsd/hdapsd.wrapper +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -[ -f /etc/conf.d/hdapsd ] && source /etc/conf.d/hdapsd - -OPTS="-bp" - -if [ -z "${DEVICE}" ]; then - OPTS="${OPTS} -d sda" -else - for i in ${DEVICE[@]}; do - OPTS="${OPTS} -d ${i}" - done -fi - -[ ! -z "${SENSITIVITY}" ] && OPTS="${OPTS} -s ${SENSITIVITY}" -[ "${ADAPTIVE}" == "yes" ] && OPTS="${OPTS} -a" -[ "${SYSLOG}" == "yes" ] && OPTS="${OPTS} -l" -[ "${FORCE}" == "yes" ] && OPTS="${OPTS} -f" - -/usr/sbin/hdapsd ${OPTS} |