From f9ddb1bdfc0156f6ad376c3839b11178fe631179 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Fri, 11 Sep 2015 08:58:26 +0200 Subject: [PATCH] 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 --- service.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service.c b/service.c index 3dd80099..89c389f1 100644 --- a/service.c +++ b/service.c @@ -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(); }