Unmount the hierarchy too.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Mon, 25 Aug 2008 22:55:45 +0000 (22:55 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Mon, 25 Aug 2008 22:55:45 +0000 (22:55 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2775 94cd875c-1c1d-0410-91d2-eb244daf1a30

sysv/util-vserver

index 4f7f035..f6081e7 100755 (executable)
@@ -60,6 +60,13 @@ function mount_cgroup()
     $_MOUNT -t cgroup -o "$CGROUP_SUBSYS" vserver "$CGROUP_MNT"
 }
 
+function umount_cgroup()
+{
+    _generateCgroupOptions
+    test -n "$CGROUP_MNT" || return 0
+    $_UMOUNT "$CGROUP_MNT"
+}
+
 function start()
 {
     _beginResult $"Creating required directories"
@@ -91,6 +98,11 @@ function stop()
     kill_contexts
     _endResult $?
     local retval=$?
+    if hasCgroup; then
+       _beginResult $"Unmounting cgroup-hierarchy"
+       umount_cgroup
+       _endResult $?
+    fi
     $_RM -f "$lockfile"
     return $retval
 }