From: jow Date: Sun, 5 Feb 2012 16:54:02 +0000 (+0000) Subject: [packages_10.03.2] smartmontools: merge r28326, r28918, r29199 X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=7c416474b28c15a23ea2b5eb09f0f3941a2b44cf;p=10.03%2Fpackages.git [packages_10.03.2] smartmontools: merge r28326, r28918, r29199 git-svn-id: svn://svn.openwrt.org/openwrt/branches/packages_10.03.2@30301 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/utils/smartmontools/Makefile b/utils/smartmontools/Makefile index 9220aea..1711b91 100644 --- a/utils/smartmontools/Makefile +++ b/utils/smartmontools/Makefile @@ -1,5 +1,5 @@ -# -# Copyright (C) 2006-2010 OpenWrt.org +# +# Copyright (C) 2006-2011 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=smartmontools PKG_VERSION:=5.40 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/smartmontools @@ -17,19 +17,37 @@ PKG_MD5SUM:=0f0be0239914ad87830a4fff594bda5b include $(INCLUDE_DIR)/package.mk -define Package/smartmontools +define Package/smartmontools/Default SECTION:=utils CATEGORY:=Utilities DEPENDS:=+uclibcxx - TITLE:=S.M.A.R.T Monitoring Tool + TITLE:=S.M.A.R.T Monitoring URL:=http://smartmontools.sourceforge.net/ endef +define Package/smartmontools + $(call Package/smartmontools/Default) + TITLE+= Tool +endef + define Package/smartmontools/description - smartmontools contains utility programs (smartctl, smartd) to - control/monitor storage systems using the Self-Monitoring, Analysis - and Reporting Technology System (S.M.A.R.T.) built into most modern - ATA and SCSI disks. It is derived from smartsuite. + smartmontools contains utility programs (smartctl) to + control/monitor storage systems using the Self-Monitoring, Analysis + and Reporting Technology System (S.M.A.R.T.) built into most modern + ATA and SCSI disks. It is derived from smartsuite. +endef + +define Package/smartd + $(call Package/smartmontools/Default) + DEPENDS+= +rsync + TITLE+= Daemon +endef + +define Package/smartd/description + smartmontools contains utility programs (smartd) to + control/monitor storage systems using the Self-Monitoring, Analysis + and Reporting Technology System (S.M.A.R.T.) built into most modern + ATA and SCSI disks. It is derived from smartsuite. endef # uses GNU configure @@ -49,17 +67,26 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - LD="$(TARGET_CXX)" + LD="$(TARGET_CXX)" endef define Package/smartmontools/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/ +endef + +define Package/smartd/install + $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/smartd.conf $(1)/etc + $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd endef +define Package/smartd/conffiles +/etc/smartd.conf +endef + $(eval $(call BuildPackage,smartmontools)) +$(eval $(call BuildPackage,smartd)) diff --git a/utils/smartmontools/files/smartd.init b/utils/smartmontools/files/smartd.init index 0e8d571..f1453f2 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 } - -