From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- extra/smartmontools/PKGBUILD | 42 +++++++++++++++++++++++++++++++++++++++++ extra/smartmontools/smartd.conf | 1 + extra/smartmontools/smartd.rc | 39 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 extra/smartmontools/PKGBUILD create mode 100644 extra/smartmontools/smartd.conf create mode 100755 extra/smartmontools/smartd.rc (limited to 'extra/smartmontools') diff --git a/extra/smartmontools/PKGBUILD b/extra/smartmontools/PKGBUILD new file mode 100644 index 000000000..3961405be --- /dev/null +++ b/extra/smartmontools/PKGBUILD @@ -0,0 +1,42 @@ +# $Id: PKGBUILD 96222 2010-10-19 12:09:31Z giovanni $ +# Maintainer: Giovanni Scafora +# Contributor: Jeff Mickey +# Contributor: Jani Talikka +# Contributor: Ralf Barth + +pkgname=smartmontools +pkgver=5.40 +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' + 'etc/conf.d/smartd') +source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz \ + smartd.conf + smartd.rc) +md5sums=('0f0be0239914ad87830a4fff594bda5b' + '28c1b80c41dac52d433961dcfb4f70e0' + 'fb30e07f87f2c1d99532e018291ad3e8') + +build() +{ + cd "${srcdir}/${pkgname}-${pkgver}" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --enable-drivedb + make || return 1 +} + +package() +{ + cd "${srcdir}/${pkgname}-${pkgver}" + + make DESTDIR=${pkgdir}/ install || return 1 + rm -rf ${pkgdir}/etc/rc.d + install -Dm755 ${srcdir}/smartd.rc ${pkgdir}/etc/rc.d/smartd + install -Dm644 ${srcdir}/smartd.conf ${pkgdir}/etc/conf.d/smartd +} diff --git a/extra/smartmontools/smartd.conf b/extra/smartmontools/smartd.conf new file mode 100644 index 000000000..f14870abf --- /dev/null +++ b/extra/smartmontools/smartd.conf @@ -0,0 +1 @@ +SMARTD_ARGS="" diff --git a/extra/smartmontools/smartd.rc b/extra/smartmontools/smartd.rc new file mode 100755 index 000000000..16920db12 --- /dev/null +++ b/extra/smartmontools/smartd.rc @@ -0,0 +1,39 @@ +#!/bin/bash + +# source application-specific settings +SMARTD_ARGS= +[ -f /etc/conf.d/smartd ] && . /etc/conf.d/smartd + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + + start) + stat_busy "Starting smartd" + /usr/sbin/smartd ${SMARTD_ARGS} &>/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 v1.2.3-54-g00ecf