diff options
author | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2023-03-14 18:52:52 -0300 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2023-10-19 10:56:54 +0200 |
commit | c138f4bf100aca2abc630daf2b46713560c033d4 (patch) | |
tree | 628ade7b2c39b95198acad3420e5d050d66db2a1 | |
parent | c1134b3ce72b1ee3b28897bcc9c355c68fa6f388 (diff) |
gendepends.sh.in: Conditionally add user services
For dependency calculation for user services. When in user service mode,
non-user services are not considered.
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
-rw-r--r-- | sh/gendepends.sh.in | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in index 5852c772..3000dca1 100644 --- a/sh/gendepends.sh.in +++ b/sh/gendepends.sh.in @@ -53,11 +53,21 @@ depend() { : } -_done_dirs= -for _dir in \ +dirs=" @SYSCONFDIR@/init.d \ @PKG_PREFIX@/etc/init.d \ @LOCAL_PREFIX@/etc/init.d +" + +if [ "${RC_USER_SERVICES}" = "YES" ]; then + dirs=" + @SYSCONFDIR@/init.d/user.d + ${XDG_CONFIG_HOME:-${HOME}/.config}/openrc/init.d + " +fi + +_done_dirs= +for _dir in ${dirs} do [ -d "$_dir" ] || continue @@ -127,3 +137,4 @@ do ) done done +unset dirs |