From: Nicolas Thill Date: Wed, 9 Nov 2011 23:43:47 +0000 (+0000) Subject: packages/smartmontools: use new service functions X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=0c4b70dff4fb1a485acadf2e5933f1cdc57fb45b packages/smartmontools: use new service functions SVN-Revision: 28918 --- diff --git a/utils/smartmontools/Makefile b/utils/smartmontools/Makefile index 16636c6427..4f909612c8 100644 --- a/utils/smartmontools/Makefile +++ b/utils/smartmontools/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=smartmontools PKG_VERSION:=5.40 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/smartmontools diff --git a/utils/smartmontools/files/smartd.init b/utils/smartmontools/files/smartd.init index 0e8d57119a..f1453f2577 100644 --- a/utils/smartmontools/files/smartd.init +++ b/utils/smartmontools/files/smartd.init @@ -1,28 +1,16 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org START=95 + start() { - [ -f /etc/smartd.conf ] || { - echo "/etc/smartd.conf does not exist !"; - exit 0; - }; - [ -d /var/run ] || mkdir -p /var/run - [ -x /usr/sbin/smartd ] && /usr/sbin/smartd -q never -p /var/run/smartd.pid + service_start /usr/sbin/smartd -q never } stop() { - killall smartd -} - -restart() { - stop - sleep 1 - start + service_stop /usr/sbin/smartd } reload() { - kill -HUP `cat /var/run/smartd.pid` &>/dev/null + service_reload /usr/sbin/smartd } - -