update pvl/hosts: only test the global dhcp config, since things like sublclasses means that the individual dhcp confs will not pass
--- a/lib/pvl/hosts/dhcp.sh Mon Mar 02 19:58:35 2015 +0200
+++ b/lib/pvl/hosts/dhcp.sh Mon Mar 02 20:02:14 2015 +0200
@@ -44,22 +44,19 @@
## Test DHCP configuration for validity using dhcpd -t:
#
-# check_dhcp [$conf]
+# check_dhcp
#
-# Defaults to the global $DHCPD_CONF.
-# Fails if the check fails.
+# Uses the global $DHCPD_CONF,
function test_dhcp {
- local conf="$1"
-
if [ ! -e "$DHCP_SBIN" ]; then
log_warn "check_dhcp: dhcpd not installed, skipping: $conf"
return 0
fi
- log_check "Checking DHCP: $conf"
+ log_check "Checking DHCP: $DHCP_CONF"
test_cmd "$conf" \
- "$DHCP_SBIN" -cf "$conf" -t
+ "$DHCP_SBIN" -cf "$DHCP_CONF" -t
}
## Reload dhcp hosts
@@ -81,9 +78,6 @@
return
- elif ! test_dhcp "$DHCP_CONF"; then
- log_error "Skip config error DHCP"
-
elif ! service_status $DHCP_SERVICE; then
log_skip "dhcpd not running; did not restart"
--- a/lib/pvl/hosts/update.sh Mon Mar 02 19:58:35 2015 +0200
+++ b/lib/pvl/hosts/update.sh Mon Mar 02 20:02:14 2015 +0200
@@ -125,9 +125,7 @@
reload_zones
log "Testing DHCP..."
- for conf in $(list_files var/dhcp); do
- test_dhcp "var/dhcp/$conf"
- done
+ test_dhcp
log "Reload DHCP..."
reload_dhcp