From 33d3f33b3ca7dd2ce616b8182d588d0743c2f124 Mon Sep 17 00:00:00 2001 From: Ian Stakenvicius Date: Mon, 26 Oct 2015 15:20:58 -0400 Subject: 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 --- sh/gendepends.sh.in | 3 +++ sh/openrc-run.sh.in | 3 +++ 2 files changed, 6 insertions(+) (limited to 'sh') 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 $*" } -- cgit v1.2.3