sh/rc-functions.sh: add need_if_exists convenience function

This commit is contained in:
William Hubbs 2017-09-22 17:22:50 -05:00
parent c46adf1434
commit 1ccba05658

View File

@ -119,6 +119,13 @@ get_bootparam_value()
echo $result
}
need_if_exists()
{
for x; do
rc-service --exists "${x}" && need "${x}"
done
}
# Called from openrc-run.sh or gendepends.sh
_get_containers() {
local c