fix config file verification with -cf in DHCPDARGS

This commit is contained in:
jvdias 2005-02-16 00:19:41 +00:00
parent 935913d4d9
commit e4ab5eb2b8

View File

@ -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