lib/pvl/hosts/dhcp.sh
changeset 701 8ddc141af313
parent 664 10ac59f9d4e7
child 715 76ed62924d50
--- 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"