summaryrefslogtreecommitdiff
path: root/sh/runscript.sh.in
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-09-04 16:00:08 +0100
committerRoy Marples <roy@marples.name>2009-09-04 16:00:08 +0100
commit3dc712e22244b5286782957255de42d00f37cd4d (patch)
treedba59eaa0ee625d9c63bfae1414fd31b17c53fef /sh/runscript.sh.in
parent44585fea46c81791e15d33b7f8ad939ebbc2cb6c (diff)
downloadopenrc-3dc712e22244b5286782957255de42d00f37cd4d.tar.gz
openrc-3dc712e22244b5286782957255de42d00f37cd4d.tar.bz2
openrc-3dc712e22244b5286782957255de42d00f37cd4d.tar.xz
Allow init scripts to show their dependencies easier
Diffstat (limited to 'sh/runscript.sh.in')
-rw-r--r--sh/runscript.sh.in25
1 files changed, 24 insertions, 1 deletions
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in
index d7020e3..4c60a1b 100644
--- a/sh/runscript.sh.in
+++ b/sh/runscript.sh.in
@@ -25,6 +25,29 @@ shift
# Compat
export SVCNAME=$RC_SVCNAME
+# Dependency function
+config() {
+ [ -n "$*" ] && echo "config $*"
+}
+need() {
+ [ -n "$*" ] && echo "need $*"
+}
+use() {
+ [ -n "$*" ] && echo "use $*"
+}
+before() {
+ [ -n "$*" ] && echo "before $*"
+}
+after() {
+ [ -n "$*" ] && echo "after $*"
+}
+provide() {
+ [ -n "$*" ] && echo "provide $*"
+}
+keyword() {
+ [ -n "$*" ] && echo "keyword $*"
+}
+
# Descript the init script to the user
describe()
{
@@ -165,7 +188,7 @@ unset _f
while [ -n "$1" ]; do
# See if we have the required function and run it
- for _cmd in describe start stop status ${extra_commands:-$opts} \
+ for _cmd in describe start stop status depend ${extra_commands:-$opts} \
$extra_started_commands
do
if [ "$_cmd" = "$1" ]; then