Make sure to always run HOOK_SVC_RECONF when services have been stopped.

Previously `HOOK_SVC_RECONF` was only called on `initctl reload`,
now we also call it on `initctl emit "STOP"`.  This seems like a
good idea atm, hopefully it will remain a good idea.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-09-11 08:58:39 +02:00
parent 5701a00558
commit f9ddb1bdfc
+3 -3
View File
@@ -368,6 +368,9 @@ void service_stop_dynamic(void)
if (svc_is_changed(svc))
service_stop(svc);
}
_d("All disabled/removed services have been stoppped, calling reconf hooks ...");
plugin_run_hooks(HOOK_SVC_RECONF); /* Reconfigure HW/VLANs/etc here */
}
/* stop + start */
@@ -431,9 +434,6 @@ void service_reload_dynamic(void)
/* Then stop any disabled/removed services and non-reloadable */
service_stop_dynamic();
_d("All disabled/removed services have been stoppped, calling reconf hooks ...");
plugin_run_hooks(HOOK_SVC_RECONF); /* Reconfigure HW/VLANs/etc here */
/* Finish off by starting/reload modified/new services */
service_start_dynamic();
}