Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | ### BEGIN INIT INFO |
| 3 | # Provides: cgroups mount |
| 4 | # Required-Start: $network $remote_fs |
| 5 | # Required-Stop: $network $remote_fs |
| 6 | # Default-Start: 2 3 4 5 |
| 7 | # Default-Stop: 0 1 6 |
| 8 | # Short-Description: mount/unmount cgroups |
| 9 | ### END INIT INFO |
| 10 | |
| 11 | # must start before libvirtd is run |
| 12 | case "$1" in |
| 13 | start) |
| 14 | echo -n "Mounting cgroups..." |
| 15 | /bin/cgroups-mount |
| 16 | echo "Done" |
| 17 | ;; |
| 18 | stop) |
| 19 | echo -n "Unmounting cgroups..." |
| 20 | /bin/cgroups-umount |
| 21 | echo "Done" |
| 22 | ;; |
| 23 | *) |
| 24 | echo "Usage: /etc/init.d/cgroups-init {start|stop}" |
| 25 | exit 1 |
| 26 | ;; |
| 27 | esac |