sh/rc-functions.sh: add need_if_exists convenience function
This commit is contained in:
parent
c46adf1434
commit
1ccba05658
@ -119,6 +119,13 @@ get_bootparam_value()
|
|||||||
echo $result
|
echo $result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
need_if_exists()
|
||||||
|
{
|
||||||
|
for x; do
|
||||||
|
rc-service --exists "${x}" && need "${x}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Called from openrc-run.sh or gendepends.sh
|
# Called from openrc-run.sh or gendepends.sh
|
||||||
_get_containers() {
|
_get_containers() {
|
||||||
local c
|
local c
|
||||||
|
Loading…
Reference in New Issue
Block a user