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/openrc-run.sh.in | |
parent | f5cf1136e70502ee530f20f0434f312611b12b51 (diff) |
add support for -containers keyword
Diffstat (limited to 'sh/openrc-run.sh.in')
-rw-r--r-- | sh/openrc-run.sh.in | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sh/openrc-run.sh.in b/sh/openrc-run.sh.in index c1692048..5018cee6 100644 --- a/sh/openrc-run.sh.in +++ b/sh/openrc-run.sh.in @@ -79,7 +79,18 @@ provide() { [ -n "$*" ] && echo "provide $*" } keyword() { - [ -n "$*" ] && echo "keyword $*" + local c x + set -- $* + while [ -n "$*" ]; do + case "$1" in + -containers) x="$(_get_containers)" ;; + !-containers) x="$(_get_containers_remove)" ;; + *) x=$1 ;; + esac + c="${c}${x} " + shift + done + [ -n "$c" ] && echo "keyword $c" } # Describe the init script to the user |