summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-07-10 23:47:15 +0200
committerLennart Poettering <lennart@poettering.net>2013-07-10 23:47:15 +0200
commitac9ef33358b6e6277cfca86a85a49a022824549e (patch)
treecdf86ea62f210f32098bd19ad22ba718d3cdad55 /src/shared
parent49998ede042907b0ba7f5e85e02fa569da26bc04 (diff)
cgroup: when uninstalling agent, actually turn it off first
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/cgroup-util.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
index 73013d1d97..8f3c64fdc5 100644
--- a/src/shared/cgroup-util.c
+++ b/src/shared/cgroup-util.c
@@ -794,6 +794,17 @@ int cg_uninstall_release_agent(const char *controller) {
_cleanup_free_ char *fs = NULL;
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);
if (r < 0)
return r;
@@ -802,7 +813,7 @@ int cg_uninstall_release_agent(const char *controller) {
if (r < 0)
return r;
- return 0;
+ return 0;
}
int cg_is_empty(const char *controller, const char *path, bool ignore_self) {