diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2015-12-03 14:09:38 -0600 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2015-12-03 16:52:15 -0600 |
commit | 627e925463068e754ffd869f99a43634d6d9631e (patch) | |
tree | 7b8f1504c8d21ff500547976643deb066fbccb71 /sh/rc-functions.sh.in | |
parent | f5cf1136e70502ee530f20f0434f312611b12b51 (diff) |
add support for -containers keyword
Diffstat (limited to 'sh/rc-functions.sh.in')
-rw-r--r-- | sh/rc-functions.sh.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sh/rc-functions.sh.in b/sh/rc-functions.sh.in index c854876e..12eb4e2a 100644 --- a/sh/rc-functions.sh.in +++ b/sh/rc-functions.sh.in @@ -86,6 +86,27 @@ get_bootparam() } # Called from openrc-run.sh or gendepends.sh +_get_containers() { + local c + case "${RC_UNAME}" in + FreeBSD) + c="-jail" + ;; + Linux) + c="-docker -lxc -openvz -rkt -systemd-nspawn -uml -vserver" + ;; + esac + echo $c +} + +_get_containers_remove() { + local c + for x in $(_get_containers); do + c="${c}!${x} " + done + echo $c +} + _depend() { depend local _rc_svcname=$(shell_var "$RC_SVCNAME") _deptype= _depends= |