fix config file verification with -cf in DHCPDARGS
This commit is contained in:
parent
fcad0ffefc
commit
0db129b854
@ -21,7 +21,7 @@ CF='/etc/dhcpd.conf'
|
|||||||
if [[ "$DHCPDARGS" = *-cf* ]]; then
|
if [[ "$DHCPDARGS" = *-cf* ]]; then
|
||||||
CF=`echo $DHCPDARGS | sed 's/^.*-cf[\ \ ]*//;s/[\ \ ].*$//';`;
|
CF=`echo $DHCPDARGS | sed 's/^.*-cf[\ \ ]*//;s/[\ \ ].*$//';`;
|
||||||
fi;
|
fi;
|
||||||
[ -f $cf ] || exit 0
|
[ -f "$CF" ] || exit 0
|
||||||
if [ ! -f /var/lib/dhcp/dhcpd.leases ] ; then
|
if [ ! -f /var/lib/dhcp/dhcpd.leases ] ; then
|
||||||
touch /var/lib/dhcp/dhcpd.leases
|
touch /var/lib/dhcp/dhcpd.leases
|
||||||
[ -x /sbin/restorecon ] && [ -d /selinux ] && /sbin/restorecon /var/lib/dhcp/dhcpd.leases
|
[ -x /sbin/restorecon ] && [ -d /selinux ] && /sbin/restorecon /var/lib/dhcp/dhcpd.leases
|
||||||
|
Loading…
Reference in New Issue
Block a user