fix config file verification with -cf in DHCPDARGS
This commit is contained in:
parent
935913d4d9
commit
e4ab5eb2b8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user