ports/138461: net/isc-dhcp31-server rcNG script has syntax errors
Neil Darlow
neil at darlow.co.uk
Tue Sep 1 21:00:05 UTC 2009
>Number: 138461
>Category: ports
>Synopsis: net/isc-dhcp31-server rcNG script has syntax errors
>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 Sep 01 21:00:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Neil Darlow
>Release: FreeBSD 7.2-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD router.darlow.co.uk 7.2-RELEASE-p3 FreeBSD 7.2-RELEASE-p3 #0: Wed Jul 29 19:55:32 BST 2009 root at router.darlow.co.uk:/usr/obj/usr/src/sys/ROUTER i386
>Description:
The sed expression processing $rc_flags contains two errors:
1) Use of $(rc_flags) where ${rc_flags} is intended
2) Misplaced ' character in -q$)'//` where -q$)'//` is intended
Additionally, there is an echo command for $rc_flags which has probably been left
behind from debugging.
>How-To-Repeat:
Restart isc-dhcpd and note output produced.
>Fix:
Patch follows.
--- isc-dhcpd.orig 2009-08-31 21:36:24.000000000 +0100
+++ isc-dhcpd 2009-09-01 21:40:31.000000000 +0100
@@ -706,9 +706,8 @@
setup_flags
rc_flags_mod="$rc_flags"
# Eliminate '-q' flag if it is present
- echo $rc_flags
case "$rc_flags" in
- *-q*) rc_flags_mod=`echo "$(rc_flags)" | sed -Ee 's/(^-q | -q | -q$)'//` ;;
+ *-q*) rc_flags_mod=`echo "${rc_flags}" | sed -Ee 's/(^-q | -q | -q$)//'` ;;
esac
if ! ${command} -t -q ${rc_flags_mod}; then
err 1 "`${command} -t ${rc_flags_mod}` Configuration file sanity check failed"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list