openrc/sh
Christian Brauner 16ff3cd8df check whether /sys/fs/cgroup is a mountpoint
The current check only tries to detect whether /sys/fs/cgroup exists and
whether it is writable or not. But when the init system doesn't mount
cgroups then /sys/fs/cgroup will just be an empty directory. When paired
with unprivileged containers that mount sysfs this will cause misleading
errors to be printed since /sys/fs/cgroup will be owned by user
nobody:nogroup in this case. Independent of this specific problem this
check will also be misleading when the /sys/fs/cgroup exists and is in
fact writable by the init system but isn't actually a mountpoint.

Note from William. "grep -qs" doesn't need to redirect output to
/dev/null since it is completely silent.

This fixes #209.
2018-02-23 15:51:12 -06:00
..
.gitignore split tmpfiles processing into opentmpfiles 2016-12-01 12:04:54 -06:00
binfmt.sh.in binfmt.sh: use read in raw mode 2016-02-19 15:25:53 -06:00
cgroup-release-agent.sh.in Convert OpenRC to a centralized copyright/license structure 2015-12-21 12:16:06 -06:00
functions.sh.in Convert OpenRC to a centralized copyright/license structure 2015-12-21 12:16:06 -06:00
gendepends.sh.in sh/gendepends.sh.in: fix detection of service scripts 2017-03-23 13:17:11 -05:00
init-early.sh.Linux.in Convert OpenRC to a centralized copyright/license structure 2015-12-21 12:16:06 -06:00
init.sh.BSD.in sh/init.sh: fix the test for cache restoration 2016-09-12 12:58:31 -05:00
init.sh.GNU-kFreeBSD.in sh/init.sh: fix the test for cache restoration 2016-09-12 12:58:31 -05:00
init.sh.GNU.in sh/init.sh: fix the test for cache restoration 2016-09-12 12:58:31 -05:00
init.sh.Linux.in sh/init.sh.Linux.in: remove unused check for Gnu/KFreeBSD 2016-12-18 11:53:12 -06:00
Makefile split tmpfiles processing into opentmpfiles 2016-12-01 12:04:54 -06:00
migrate-to-run.sh.in Convert OpenRC to a centralized copyright/license structure 2015-12-21 12:16:06 -06:00
openrc-run.sh.in check whether /sys/fs/cgroup is a mountpoint 2018-02-23 15:51:12 -06:00
rc-cgroup.sh.in cgroups_cleanup: clean up shutdown signaling 2017-10-25 21:19:15 -05:00
rc-functions.sh.in sh/rc-functions.sh: add need_if_exists convenience function 2017-09-22 17:22:50 -05:00
rc-mount.sh Convert OpenRC to a centralized copyright/license structure 2015-12-21 12:16:06 -06:00
runit.sh Make use of name vs RC_SVCNAME consistent in supervisor scripts 2016-09-13 12:52:10 -05:00
runtests.sh Convert OpenRC to a centralized copyright/license structure 2015-12-21 12:16:06 -06:00
s6.sh s6 supervisor fixes 2017-11-16 15:35:35 -06:00
start-stop-daemon.sh add more variables for start-stop-daemon and supervise-daemon options 2017-11-29 15:06:06 -06:00
supervise-daemon.sh add more variables for start-stop-daemon and supervise-daemon options 2017-11-29 15:06:06 -06:00