[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. debian/4.1.1-P1-16.1-45-gd5f8c92

Andrew Pollock apollock at debian.org
Mon Aug 29 06:05:55 UTC 2011


The following commit has been merged in the master branch:
commit d5f8c922e5c6f5e0563a5d71f1e291c9e3691280
Author: Andrew Pollock <apollock at debian.org>
Date:   Sun Aug 28 23:04:41 2011 -0700

    Suppress error message
    
    If the PID file name is not overridden in the dhcpd.conf, the attempt to
    extract it from the config file causes an error from sed
    
    sed: -e expression #1, char 49: invalid reference \1 on `s' command's RHS
    
    So just dev null all stderr from sed

diff --git a/debian/isc-dhcp-server.init.d b/debian/isc-dhcp-server.init.d
index 5ca732a..3ca7378 100644
--- a/debian/isc-dhcp-server.init.d
+++ b/debian/isc-dhcp-server.init.d
@@ -18,7 +18,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
 test -f /usr/sbin/dhcpd || exit 0
 
-DHCPD_DEFAULT=${DHCPD_DEFAULT:-/etc/default/isc-dhcp-server}
+DHCPD_DEFAULT="${DHCPD_DEFAULT:-/etc/default/isc-dhcp-server}"
 
 # It is not safe to start if we don't have a default configuration...
 if [ ! -f "$DHCPD_DEFAULT" ]; then
@@ -40,7 +40,7 @@ DESC="ISC DHCP server"
 DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/dhcpd.conf}
 # try to read pid file name from config file, with fallback to /var/run/dhcpd.pid
 if [ -z "$DHCPD_PID" ]; then
-	DHCPD_PID=$(sed -n -e 's/^[ \t]*pid-file-name[ \t]*"(.*)"[ \t]*;.*$/\1/p' < "$DHCPD_CONF" | head -n 1)
+	DHCPD_PID=$(sed -n -e 's/^[ \t]*pid-file-name[ \t]*"(.*)"[ \t]*;.*$/\1/p' < "$DHCPD_CONF" 2>/dev/null | head -n 1)
 fi
 DHCPD_PID="${DHCPD_PID:-/var/run/dhcpd.pid}"
 

-- 
ISC DHCP packaging for Debian



More information about the pkg-dhcp-commits mailing list