diff --git a/dhcpd.init b/dhcpd.init index f574e23..74a4670 100644 --- a/dhcpd.init +++ b/dhcpd.init @@ -17,7 +17,11 @@ [ ${NETWORKING} = "no" ] && exit 0 [ -f /usr/sbin/dhcpd ] || exit 0 -[ -f /etc/dhcpd.conf ] || exit 0 +CF='/etc/dhcpd.conf' +if [[ "$DHCPDARGS" = *-cf* ]]; then + CF=`echo $DHCPDARGS | sed 's/^.*-cf[\ \ ]*//;s/[\ \ ].*$//';`; +fi; +[ -f $cf ] || exit 0 if [ ! -f /var/lib/dhcp/dhcpd.leases ] ; then touch /var/lib/dhcp/dhcpd.leases [ -x /sbin/restorecon ] && [ -d /selinux ] && /sbin/restorecon /var/lib/dhcp/dhcpd.leases