equal
deleted
inserted
replaced
292 # Defaults to the global $DHCPD_CONF. |
292 # Defaults to the global $DHCPD_CONF. |
293 # Fails if the check fails. |
293 # Fails if the check fails. |
294 function check_dhcp { |
294 function check_dhcp { |
295 local conf=${1:-$DHCPD_CONF} |
295 local conf=${1:-$DHCPD_CONF} |
296 |
296 |
|
297 if [ ! -e $DHCPD ]; then |
|
298 log_warn "check_dhcp: dhcpd not installed, skipping: $conf" |
|
299 return 0 |
|
300 fi |
|
301 |
297 check_generic $conf \ |
302 check_generic $conf \ |
298 $DHCPD -cf $conf -t |
303 $DHCPD -cf $conf -t |
299 } |
304 } |
300 |
305 |
301 ## Test DHCP configuration of given settings/dhcp using check_dhcp $DHCP_DATA/$host.conf: |
306 ## Test DHCP configuration of given settings/dhcp using check_dhcp $DHCP_DATA/$host.conf: |
351 do_reload_zones |
356 do_reload_zones |
352 |
357 |
353 elif [ $RELOAD_NOOP ]; then |
358 elif [ $RELOAD_NOOP ]; then |
354 log_noop "$msg: skipped" |
359 log_noop "$msg: skipped" |
355 |
360 |
|
361 elif [ ! -e $RNDC ]; then |
|
362 log_warn "reload_zones: rndc not installed, skipping" |
|
363 |
|
364 elif [ ! -e $RNDC_KEY ]; then |
|
365 log_warn " $msg: rndc: key not found: $RNDC_KEY" |
|
366 |
356 elif [ ! -r $RNDC_KEY ]; then |
367 elif [ ! -r $RNDC_KEY ]; then |
357 log_error " $msg: rndc: permission denied: $RNDC_KEY" |
368 log_error " $msg: rndc: permission denied: $RNDC_KEY" |
358 |
369 |
359 return 1 |
370 return 1 |
360 |
371 |
392 |
403 |
393 do_reload_dhcp |
404 do_reload_dhcp |
394 |
405 |
395 elif [ $RELOAD_NOOP ]; then |
406 elif [ $RELOAD_NOOP ]; then |
396 log_noop "$msg: skipped" |
407 log_noop "$msg: skipped" |
397 |
408 |
|
409 elif [ ! -e $DHCPD ]; then |
|
410 log_warn "reload_dhcp: dhcpd not installed, skipping: $conf" |
|
411 |
398 else |
412 else |
399 log_update "$msg..." |
413 log_update "$msg..." |
400 |
414 |
401 # run |
415 # run |
402 do_reload_dhcp |
416 do_reload_dhcp |