# HG changeset patch # User Tero Marttila # Date 1425319334 -7200 # Node ID 8ddc141af313f26d6bef6ca088bf1856bb5264f2 # Parent 88b0d3df1ad74bb5232e645c58338bf63aa523fe update pvl/hosts: only test the global dhcp config, since things like sublclasses means that the individual dhcp confs will not pass diff -r 88b0d3df1ad7 -r 8ddc141af313 lib/pvl/hosts/dhcp.sh --- 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" diff -r 88b0d3df1ad7 -r 8ddc141af313 lib/pvl/hosts/update.sh --- 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