Date: Tue, 26 May 2009 14:53:18 +0400 (MSD) From: Dmitry Morozovsky <marck@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/134954: sysutils/smartmontools fix for daily script Message-ID: <200905261053.n4QArIJe087476@woozle.rinet.ru> Resent-Message-ID: <200905261110.n4QBA3vg084379@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 134954 >Category: ports >Synopsis: sysutils/smartmontools fix for daily script >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 26 11:10:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Dmitry Morozovsky >Release: FreeBSD 7-STABLE i386 >Organization: Cronyx Plus LLC (RiNet ISP) >Environment: System: FreeBSD 7-STABLE >Description: Fix typo in smart periodic script. Add simple autodetect mode (works only for regular disks). >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/sysutils/smartmontools/Makefile,v retrieving revision 1.38 diff -u -r1.38 Makefile --- Makefile 25 May 2009 12:28:25 -0000 1.38 +++ Makefile 26 May 2009 10:51:29 -0000 @@ -7,7 +7,7 @@ PORTNAME= smartmontools PORTVERSION= 5.38 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} Index: files/smart.in =================================================================== RCS file: /home/ncvs/ports/sysutils/smartmontools/files/smart.in,v retrieving revision 1.3 diff -u -r1.3 smart.in --- files/smart.in 31 Dec 2008 16:58:11 -0000 1.3 +++ files/smart.in 26 May 2009 10:51:29 -0000 @@ -12,12 +12,21 @@ smartctl=%%PREFIX%%/sbin/smartctl : ${daily_status_smartctl_flags="-H"} : ${daily_status_smartctl_extra_status_flags="-a"} -# no default for ${daily_status_smart_devices} + +case "${daily_status_smart_devices}" in + # XXX AUTO mode selects only regular ad/da disks + [Aa][Uu][Tt][Oo]) + daily_status_smart_devices=`ls /dev/da*[0-9] /dev/ad*[0-9] 2>/dev/null` + ;; + *) ;; +esac + if [ -z "${daily_status_smart_devices}" ]; then - : ${daily_status_smart_enabled="NO"} + : ${daily_status_smart_enable="NO"} else - : ${daily_status_smart_enabled="YES"} + : ${daily_status_smart_enable="YES"} fi + trim_junk="tail -n +4" tmpfile="$(mktemp /var/run/daily.XXXXXXXX)" @@ -25,9 +34,7 @@ rc=0 case "${daily_status_smart_enable}" in - [Nn][Oo]) - ;; - *) + [Yy][Ee][Ss]) for device in ${daily_status_smart_devices}; do if [ -e ${device} ]; then echo >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905261053.n4QArIJe087476>