Date: Wed, 3 Jun 2009 18:08:33 +0400 (MSD) From: Dmitry Morozovsky <marck@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/135213: sysutils/smartmontools: fix for AUTOdetect mode Message-ID: <200906031408.n53E8XN7017245@woozle.rinet.ru> Resent-Message-ID: <200906031410.n53EA18a050715@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 135213 >Category: ports >Synopsis: sysutils/smartmontools: fix for AUTOdetect mode >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Jun 03 14:10:01 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: Jeremy Chadwick prodded me about questionable correctness of autodetect procedure, and give nice idea about using kern.disks sysctl. Here is the implementation. >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/sysutils/smartmontools/Makefile,v retrieving revision 1.39 diff -u -r1.39 Makefile --- Makefile 29 May 2009 12:13:26 -0000 1.39 +++ Makefile 3 Jun 2009 14:04:38 -0000 @@ -7,7 +7,7 @@ PORTNAME= smartmontools PORTVERSION= 5.38 -PORTREVISION= 5 +PORTREVISION= 6 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.4 diff -u -r1.4 smart.in --- files/smart.in 29 May 2009 12:13:26 -0000 1.4 +++ files/smart.in 3 Jun 2009 14:04:38 -0000 @@ -16,7 +16,7 @@ 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` + daily_status_smart_devices=`sysctl -n kern.disks` ;; *) ;; esac @@ -35,6 +35,7 @@ rc=0 case "${daily_status_smart_enable}" in [Yy][Ee][Ss]) + cd /dev 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?200906031408.n53E8XN7017245>