diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-06-27 15:54:07 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-06-27 15:54:07 +0200 |
commit | c5f9125c75bd2aa7db9dfad6e2dc178fff2d2f73 (patch) | |
tree | bb0749cbeee69faadf0fc1115954cd07f775531a /src/wgtpkg-unit.c | |
parent | 31943af2e46375265bb865e20a6e50f365d2a6dd (diff) |
Moves handling of reloads
The new version ensures that the daemons are responsibles
of reloading the units. This is no more done by default.
Change-Id: I9ff33a628dfc05e429dbc7bf127d641691f2a3b9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/wgtpkg-unit.c')
-rw-r--r-- | src/wgtpkg-unit.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/wgtpkg-unit.c b/src/wgtpkg-unit.c index e6e67bf..8607eb4 100644 --- a/src/wgtpkg-unit.c +++ b/src/wgtpkg-unit.c @@ -470,36 +470,6 @@ static int get_wants_target(char *path, size_t pathlen, const struct unitdesc *d return rc; } -static int do_send_reload(const struct generatedesc *desc) -{ - int i; - int reloadsys, reloadusr; - const struct unitdesc *u; - - reloadsys = reloadusr = 0; - for (i = 0 ; i < desc->nunits ; i++) { - u = &desc->units[i]; - if (u->wanted_by != NULL) { - switch (u->scope) { - case unitscope_user: - reloadusr = 1; - break; - case unitscope_system: - reloadsys = 1; - break; - default: - break; - } - } - } - - if (reloadusr) - reloadusr = systemd_daemon_reload(1); - if (reloadsys) - reloadsys = systemd_daemon_reload(0); - return 0; -} - static int do_uninstall_units(void *closure, const struct generatedesc *desc) { int rc, rc2; @@ -527,9 +497,6 @@ static int do_uninstall_units(void *closure, const struct generatedesc *desc) if (rc2 < 0 && rc == 0) rc = rc2; } - rc2 = do_send_reload(desc); - if (rc2 < 0 && rc == 0) - rc = rc2; return rc; } @@ -564,9 +531,6 @@ static int do_install_units(void *closure, const struct generatedesc *desc) if (rc < 0) goto error; } - rc = do_send_reload(desc); - if (rc < 0) - goto error; return 0; error: i = errno; |