From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jun 3 14:10:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14EC4106567E for ; Wed, 3 Jun 2009 14:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E40BA8FC15 for ; Wed, 3 Jun 2009 14:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n53EA1tj050716 for ; Wed, 3 Jun 2009 14:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n53EA18a050715; Wed, 3 Jun 2009 14:10:01 GMT (envelope-from gnats) Resent-Date: Wed, 3 Jun 2009 14:10:01 GMT Resent-Message-Id: <200906031410.n53EA18a050715@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitry Morozovsky Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72E871065673 for ; Wed, 3 Jun 2009 14:08:35 +0000 (UTC) (envelope-from marck@woozle.rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id F2B8D8FC15 for ; Wed, 3 Jun 2009 14:08:34 +0000 (UTC) (envelope-from marck@woozle.rinet.ru) Received: from woozle.rinet.ru (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n53E8XdV017246 for ; Wed, 3 Jun 2009 18:08:33 +0400 (MSD) (envelope-from marck@woozle.rinet.ru) Received: (from marck@localhost) by woozle.rinet.ru (8.14.3/8.14.3/Submit) id n53E8XN7017245; Wed, 3 Jun 2009 18:08:33 +0400 (MSD) (envelope-from marck) Message-Id: <200906031408.n53E8XN7017245@woozle.rinet.ru> Date: Wed, 3 Jun 2009 18:08:33 +0400 (MSD) From: Dmitry Morozovsky To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/135213: sysutils/smartmontools: fix for AUTOdetect mode X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitry Morozovsky List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2009 14:10:02 -0000 >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: