From 724988f9137cdcaf078d5e88e7efec9e664b638e Mon Sep 17 00:00:00 2001 From: James Meyer Date: Thu, 6 Nov 2008 23:03:57 -0600 Subject: smarttools --- abs/extra-testing/smartmontools/PKGBUILD | 27 ++++++++++++++++++++++++ abs/extra-testing/smartmontools/smartd | 35 ++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 abs/extra-testing/smartmontools/PKGBUILD create mode 100644 abs/extra-testing/smartmontools/smartd diff --git a/abs/extra-testing/smartmontools/PKGBUILD b/abs/extra-testing/smartmontools/PKGBUILD new file mode 100644 index 0000000..dbee715 --- /dev/null +++ b/abs/extra-testing/smartmontools/PKGBUILD @@ -0,0 +1,27 @@ +# $Id: PKGBUILD 6701 2008-07-27 13:29:59Z giovanni $ +# Maintainer: Giovanni Scafora +# Contributor: Jeff Mickey +# Contributor: Jani Talikka + +pkgname=smartmontools +pkgver=5.38 +pkgrel=1 +pkgdesc="Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives." +url="http://smartmontools.sourceforge.net" +license=('GPL') +arch=('i686' 'x86_64') +depends=('gcc-libs') +backup=('etc/smartd.conf') +source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz \ + smartd) + +build() +{ + cd ${startdir}/src/${pkgname}-${pkgver} + ./configure --prefix=/usr --sysconfdir=/etc + make || return 1 + make DESTDIR=${startdir}/pkg install + rm -rf ${startdir}/pkg/etc/rc.d + install -D -m 755 ../smartd ${startdir}/pkg/etc/rc.d/smartd +} +md5sums=('a282846532ecbd6b4a28072373b3a70b' '850f98b6792b7642ff193a49a2f1139d') diff --git a/abs/extra-testing/smartmontools/smartd b/abs/extra-testing/smartmontools/smartd new file mode 100644 index 0000000..5fcc414 --- /dev/null +++ b/abs/extra-testing/smartmontools/smartd @@ -0,0 +1,35 @@ +#!/bin/bash + + . /etc/rc.conf + . /etc/rc.d/functions + + case "$1" in + + start) + stat_busy "Starting smartd" + /usr/sbin/smartd &>/dev/null + if [ $? -ne 0 ]; then + stat_fail + else + add_daemon smartd + stat_done + fi + ;; + + stop) + stat_busy "Stopping smartd" + kill -9 `pidof /usr/sbin/smartd` &>/dev/null + rm_daemon smartd + stat_done + ;; + + restart) + stat_busy "Restarting smartd ..." + $0 stop + $0 start + stat_done + ;; + + *) + echo "usage: $0 {start|stop|restart}" + esac -- cgit v0.12