Commit f3a60c85 authored by Mike Hibler's avatar Mike Hibler

Make it explicit that dhcpd is not restarted on an error.

Simply ignoring the error and letting dhcpd restart doesn't work
because dhcpd_makeconf doesn't actually ever restart dhcpd, rather
it relies on the dhcpd_wrapper. But on an error, the wrapper has
died as well. So now the error message just says that dhcpd is NOT
running and to use the startup script to restart things.
parent 978efc20
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# Copyright (c) 2000-2012 University of Utah and the Flux Group. # Copyright (c) 2000-2013 University of Utah and the Flux Group.
# #
# #
...@@ -422,7 +422,10 @@ if ($install) { ...@@ -422,7 +422,10 @@ if ($install) {
fatal("Bad pid for DHCPD: $dpid"); fatal("Bad pid for DHCPD: $dpid");
} }
if (kill('TERM', $dpid) == 0) { if (kill('TERM', $dpid) == 0) {
fatal("Could not kill(TERM) process $dpid (dhcpd): $!"); fatal("Could not kill(TERM) process $dpid (dhcpd): $!.\n".
" dhcpd will NOT be restarted.\n".
" Restart manually with ".
"'/usr/local/etc/rc.d/ start'\n");
} }
my $old_uid = $UID; my $old_uid = $UID;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment