ports/162383: [PATCH] sysutils/smartmontools Remove cd* from the list of

dirk.meyer at dinoex.sub.org dirk.meyer at dinoex.sub.org
Tue Nov 8 20:00:25 UTC 2011


>Number:         162383
>Category:       ports
>Synopsis:       [PATCH] sysutils/smartmontools Remove cd* from the list of
>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 Nov 08 20:00:24 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Dirk Meyer
>Release:        FreeBSD 8.2-RELEASE
>Organization:
privat
>Environment:

>Description:

Initially cd* was just skipped in the checking loop.
This was broken in the last change, which resulted in this script exiting with status badconfig.
Now cd* is only removed when auto is used.
If cd* is specified manually, the script still exits with badconfig.

>How-To-Repeat:

>Fix:

apply this patch:
Submitted by:	 Christoph Mallon

---
 sysutils/smartmontools/Makefile       |    2 +-
 sysutils/smartmontools/files/smart.in |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/sysutils/smartmontools/Makefile b/sysutils/smartmontools/Makefile
index c929393..f709508 100644
--- a/sysutils/smartmontools/Makefile
+++ b/sysutils/smartmontools/Makefile
@@ -7,7 +7,7 @@
 
 PORTNAME=	smartmontools
 PORTVERSION=	5.42
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 MASTER_SITES=	SF
 
diff --git a/sysutils/smartmontools/files/smart.in b/sysutils/smartmontools/files/smart.in
index 8cee79e..39acb88 100644
--- a/sysutils/smartmontools/files/smart.in
+++ b/sysutils/smartmontools/files/smart.in
@@ -16,7 +16,7 @@ smartctl=%%PREFIX%%/sbin/smartctl
 case "${daily_status_smart_devices}" in
 	# XXX AUTO mode selects only regular ad/da disks 
 	[Aa][Uu][Tt][Oo])
-		daily_status_smart_devices=`sysctl -n kern.disks`
+		daily_status_smart_devices="$(sysctl -n kern.disks | sed -E 's/[[:<:]]cd[0-9]+//g')"
 		;;
 	*)	;;
 esac
@@ -42,7 +42,6 @@ case "${daily_status_smart_enable}" in
 			device="${device#/dev/}"
 			devflags=""
 			case ${device} in
-			cd*) ;;
 			tw[ae]*) devflags="-d3ware,${device##tw[ae][0-9]*,}"
 				device="/dev/${device%,[0-9]*}"
 				;;
-- 

>Release-Note:
>Audit-Trail:
>Unformatted:
  automatically detected disks



More information about the freebsd-ports-bugs mailing list