Bug 138461 - net/isc-dhcp31-server rcNG script has syntax errors
Summary: net/isc-dhcp31-server rcNG script has syntax errors
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Josh Paetzel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-01 22:00 UTC by neil
Modified: 2009-09-02 14:50 UTC (History)
0 users

See Also:


Attachments
file.diff (571 bytes, patch)
2009-09-01 22:00 UTC, neil
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description neil 2009-09-01 22:00:04 UTC
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.

Fix: Patch follows.
How-To-Repeat: Restart isc-dhcpd and note output produced.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2009-09-01 22:00:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jpaetzel

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 neil 2009-09-02 11:56:53 UTC
Production patch for files/isc-dhcpd.in:

--- files/isc-dhcpd.in.orig	2009-07-30 08:32:44.000000000 +0100
+++ files/isc-dhcpd.in	2009-09-02 07:56:59.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"
Comment 3 dfilter service freebsd_committer freebsd_triage 2009-09-02 14:47:14 UTC
jpaetzel    2009-09-02 13:47:05 UTC

  FreeBSD ports repository

  Modified files:
    net/isc-dhcp31-server Makefile 
    net/isc-dhcp31-server/files isc-dhcpd.in 
  Log:
  Fix syntax errors in rcNG script
  
  PR:     ports/138461
  Submitted by:   Neil Darlow <neil@darlow.co.uk>
  Approved by:    itetcu@ (mentor)
  
  Revision  Changes    Path
  1.129     +1 -1      ports/net/isc-dhcp31-server/Makefile
  1.8       +2 -3      ports/net/isc-dhcp31-server/files/isc-dhcpd.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Josh Paetzel freebsd_committer freebsd_triage 2009-09-02 14:47:25 UTC
State Changed
From-To: open->closed

Committed, thanks!