diff options
author | Ian Stakenvicius <axs@gentoo.org> | 2015-10-26 15:20:58 -0400 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2015-11-12 12:32:45 -0600 |
commit | 33d3f33b3ca7dd2ce616b8182d588d0743c2f124 (patch) | |
tree | 9cd258ecf6a4787390f4c366bda04adf721bdabe /sh | |
parent | ddb895b355e02c9c07b00bfaf00d1bf8a7abbc03 (diff) |
Implement "want" dependency
The want dependency is similar to the use dependency. If a service
script, for example called service1, adds "want service2" to its depend
function, OpenRC will attempt to start service2, if it exists on the
system, when service1 is started.
However, service1 will start regardless of the status of
service2.
X-Gentoo-Bug: 406021
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406021
Diffstat (limited to 'sh')
-rw-r--r-- | sh/gendepends.sh.in | 3 | ||||
-rw-r--r-- | sh/openrc-run.sh.in | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in index dfe7444b..36caeb7d 100644 --- a/sh/gendepends.sh.in +++ b/sh/gendepends.sh.in @@ -16,6 +16,9 @@ need() { use() { [ -n "$*" ] && echo "$RC_SVCNAME iuse $*" >&3 } +want() { + [ -n "$*" ] && echo "$RC_SVCNAME iwant $*" >&3 +} before() { [ -n "$*" ] && echo "$RC_SVCNAME ibefore $*" >&3 } diff --git a/sh/openrc-run.sh.in b/sh/openrc-run.sh.in index 749af2cc..c1692048 100644 --- a/sh/openrc-run.sh.in +++ b/sh/openrc-run.sh.in @@ -66,6 +66,9 @@ need() { use() { [ -n "$*" ] && echo "use $*" } +want() { + [ -n "$*" ] && echo "want $*" +} before() { [ -n "$*" ] && echo "before $*" } |