aboutsummaryrefslogtreecommitdiff
path: root/sh/gendepends.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'sh/gendepends.sh.in')
-rw-r--r--sh/gendepends.sh.in19
1 files changed, 15 insertions, 4 deletions
diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in
index 5852c772..8ce1c87f 100644
--- a/sh/gendepends.sh.in
+++ b/sh/gendepends.sh.in
@@ -53,11 +53,21 @@ depend() {
:
}
+_dirs="
+ @SYSCONFDIR@/init.d
+ @PKG_PREFIX@/etc/init.d
+ @LOCAL_PREFIX@/etc/init.d
+"
+
+if yesno "$RC_USER_SERVICES"; then
+ _dirs="
+ @SYSCONFDIR@/user.d/init.d
+ ${XDG_CONFIG_HOME:-${HOME}/.config}/openrc/init.d
+ "
+fi
+
_done_dirs=
-for _dir in \
-@SYSCONFDIR@/init.d \
-@PKG_PREFIX@/etc/init.d \
-@LOCAL_PREFIX@/etc/init.d
+for _dir in ${_dirs}
do
[ -d "$_dir" ] || continue
@@ -127,3 +137,4 @@ do
)
done
done
+unset _dirs