Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Apr 2009 23:29:08 GMT
From:      David Wood <david@wood2.org.uk>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/133674: [maintainer update] net/freeradius2 - pkg-install.in bug fix and improvements
Message-ID:  <200904122329.n3CNT83o037901@www.freebsd.org>
Resent-Message-ID: <200904122330.n3CNU0NS092404@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         133674
>Category:       ports
>Synopsis:       [maintainer update] net/freeradius2 - pkg-install.in bug fix and improvements
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 12 23:30:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     David Wood
>Release:        7.1-RELEASE amd64
>Organization:
>Environment:
FreeBSD manganese.wood2.org.uk 7.1-RELEASE-p4 FreeBSD 7.1-RELEASE-p4 #0: Tue Mar 24 19:09:50 GMT 2009 david@manganese.wood2.org.uk:/scratch/usr/obj/usr/src/sys/MANGANESE amd64
>Description:
Delete trailing whitespace that causes an ' : not found' error.

Add error checking to the deletion of radiusd.conf.update-libdir-original.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: files/pkg-install.in
===================================================================
--- files/pkg-install.in	(.../branches/FreeBSD-ports-tree/freeradius2)	(revision 255)
+++ files/pkg-install.in	(.../trunk/freeradius2)	(revision 255)
@@ -152,13 +152,21 @@
 	        echo -n 's:^(libdir[[:space:]=]+)(.*[[:space:]:]+)?' ; \
 	        echo -n $( echo ${radius_libdir} | \
 	            sed -Ee 's:^(.*)-[[:digit:].]+$:\1:' ) ; \
-	        echo -n '(-[[:digit:].]+)?([[:space:]:]+.*)?$' ; \ 
+	        echo -n '(-[[:digit:].]+)?([[:space:]:]+.*)?$' ; \
 		echo -n ':\1\2'${radius_libdir}'\4:' \
 	    ) ${radius_raddb}/radiusd.conf; then
 	    echo "Failed to update libdir in ${radius_raddb}/radius.conf"
 	    exit 1
 	fi
-	rm ${radius_raddb}/radiusd.conf.update-libdir-original
+
+	if [ -f ${radius_raddb}/radiusd.conf.update-libdir-original ]; then
+	    if ! rm ${radius_raddb}/radiusd.conf.update-libdir-original; then
+		echo -n 'Failed to delete backup file '
+		echo "${radius_raddb}/radiusd.conf.update-libdir-original."
+		exit 1
+	    fi
+	fi
+
         ;;
 esac
 



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904122329.n3CNT83o037901>