diff options
author | Roy Marples <uberlord@gentoo.org> | 2007-03-10 20:21:39 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2007-03-10 20:21:39 +0000 |
commit | d2c3c01d0c451c74e257a618034ae5bbe55ef1be (patch) | |
tree | edc7df772a35a7ff41caf476103892946b13fe7b /net-misc/dhcp/files | |
parent | QA: Removed all references to dyn_* functions. (diff) | |
download | historical-d2c3c01d0c451c74e257a618034ae5bbe55ef1be.tar.gz historical-d2c3c01d0c451c74e257a618034ae5bbe55ef1be.tar.bz2 historical-d2c3c01d0c451c74e257a618034ae5bbe55ef1be.zip |
Bump for a non bash init script for dhcpd, #170084 thanks to Natanael Copa.
Package-Manager: portage-2.1.2.2
Diffstat (limited to 'net-misc/dhcp/files')
-rw-r--r-- | net-misc/dhcp/files/dhcpd.init | 32 | ||||
-rw-r--r-- | net-misc/dhcp/files/digest-dhcp-3.0.5-r1 | 3 |
2 files changed, 19 insertions, 16 deletions
diff --git a/net-misc/dhcp/files/dhcpd.init b/net-misc/dhcp/files/dhcpd.init index e9b6e0b8f156..4f16e115f740 100644 --- a/net-misc/dhcp/files/dhcpd.init +++ b/net-misc/dhcp/files/dhcpd.init @@ -1,21 +1,10 @@ #!/sbin/runscript # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.3 2006/05/11 14:58:34 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.4 2007/03/10 20:21:39 uberlord Exp $ DHCPD_CONF="/etc/dhcp/dhcpd.conf" -# Work out our cffile if it's on our DHCPD_OPTS -if [[ " ${DHCPD_OPTS} " == *" -cf "* ]]; then - DHCPD_CONF=" ${DHCPD_OPTS} " - DHCPD_CONF="${DHCPD_CONF##* -cf }" - DHCPD_CONF="${DHCPD_CONF%% *}" - - # Now we have the cffile, we can remove it from our options - DHCPD_OPTS="${DHCPD_OPTS//-cf/}" - DHCPD_OPTS="${DHCPD_OPTS//${DHCPD_CONF}/}" -fi - depend() { need net use logger dns @@ -27,14 +16,25 @@ get_var() { } start() { - if [[ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ]] ; then + # Work out our cffile if it's on our DHCPD_OPTS + case " ${DHCPD_OPTS} " in + *" -cf "*) + DHCPD_CONF=" ${DHCPD_OPTS} " + DHCPD_CONF="${DHCPD_CONF##* -cf }" + DHCPD_CONF="${DHCPD_CONF%% *}" + ;; + *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" + ;; + esac + + if [ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ] ; then eerror "${DHCPD_CHROOT}/${DHCPD_CONF} does not exist" return 1 fi local leasefile="$(get_var lease-file-name)" leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}" - if [[ ! -f ${leasefile} ]] ; then + if [ ! -f "${leasefile}" ] ; then ebegin "Creating ${leasefile}" touch "${leasefile}" chown dhcp:dhcp "${leasefile}" @@ -42,7 +42,7 @@ start() { fi # Setup LD_PRELOAD so name resolution works in our chroot. - if [[ -n ${DHCPD_CHROOT} ]] ; then + if [ -n "${DHCPD_CHROOT}" ] ; then LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so" export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so" fi @@ -53,7 +53,7 @@ start() { ebegin "Starting ${DHCPD_CHROOT:+chrooted }${SVCNAME}" start-stop-daemon --start --exec /usr/sbin/dhcpd \ --pidfile "${DHCPD_CHROOT}/${pidfile}" \ - -- ${DHCPD_OPTS} -q -pf "${pidfile}" -cf "${DHCPD_CONF}" \ + -- ${DHCPD_OPTS} -q -pf "${pidfile}" \ -user dhcp -group dhcp \ ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE} eend $? \ diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.5-r1 b/net-misc/dhcp/files/digest-dhcp-3.0.5-r1 new file mode 100644 index 000000000000..ea5a3e7a3a55 --- /dev/null +++ b/net-misc/dhcp/files/digest-dhcp-3.0.5-r1 @@ -0,0 +1,3 @@ +MD5 ce5d30d4645e4eab1f54561b487d1ec7 dhcp-3.0.5.tar.gz 876591 +RMD160 b968e7520fd936bd6f888f77734f3db7df23a636 dhcp-3.0.5.tar.gz 876591 +SHA256 dd445fb2a341cdd69e85693dce6f8fda1a1c9d0e98d34c01afc3e68d8037ffb6 dhcp-3.0.5.tar.gz 876591 |