mirror of
https://github.com/systemd/systemd.git
synced 2024-11-04 22:21:55 +03:00
cgroup: when uninstalling agent, actually turn it off first
This commit is contained in:
parent
49998ede04
commit
ac9ef33358
@ -794,6 +794,17 @@ int cg_uninstall_release_agent(const char *controller) {
|
|||||||
_cleanup_free_ char *fs = NULL;
|
_cleanup_free_ char *fs = NULL;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
r = cg_get_path(controller, NULL, "notify_on_release", &fs);
|
||||||
|
if (r < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
r = write_string_file(fs, "0");
|
||||||
|
if (r < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
free(fs);
|
||||||
|
fs = NULL;
|
||||||
|
|
||||||
r = cg_get_path(controller, NULL, "release_agent", &fs);
|
r = cg_get_path(controller, NULL, "release_agent", &fs);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
Loading…
Reference in New Issue
Block a user