aboutsummaryrefslogtreecommitdiff
path: root/src/shared/misc.h
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2024-03-20 23:45:47 +0100
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2024-07-19 20:40:28 +0200
commitc34fcd63f05044f9034b26c52f19c91e04668da7 (patch)
tree8ef449218cf736057197cd39fba1dac6117216c3 /src/shared/misc.h
parent917a7031d946c0b608517936fab0f54689167265 (diff)
openrc: dynamic paths for user services
add two api functions, `rc_service_dir` and `rc_sysconf_dir`, both are generate paths (and sub-paths) for resources, and meant to replace the hardcoded variables like `RC_SVCDIR`. those functions differ by dynamically switching between the system path, or the user path, set in their home folder or runtime directory. this lays out the intial support for user services. Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'src/shared/misc.h')
-rw-r--r--src/shared/misc.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/shared/misc.h b/src/shared/misc.h
index b158a786..9171a881 100644
--- a/src/shared/misc.h
+++ b/src/shared/misc.h
@@ -33,16 +33,11 @@
#define RC_LEVEL_BOOT "boot"
#define RC_LEVEL_DEFAULT "default"
-#define RC_DEPTREE_CACHE RC_SVCDIR "/deptree"
-#define RC_DEPTREE_SKEWED RC_SVCDIR "/clock-skewed"
+#define RC_DEPTREE_CACHE "deptree"
+#define RC_DEPTREE_SKEWED "clock-skewed"
#define RC_KRUNLEVEL RC_SVCDIR "/krunlevel"
-#define RC_STARTING RC_SVCDIR "/rc.starting"
-#define RC_STOPPING RC_SVCDIR "/rc.stopping"
-
-#define RC_SVCDIR_STARTING RC_SVCDIR "/starting"
-#define RC_SVCDIR_INACTIVE RC_SVCDIR "/inactive"
-#define RC_SVCDIR_STARTED RC_SVCDIR "/started"
-#define RC_SVCDIR_COLDPLUGGED RC_SVCDIR "/coldplugged"
+#define RC_STARTING "rc.starting"
+#define RC_STOPPING "rc.stopping"
char *rc_conf_value(const char *var);
bool rc_conf_yesno(const char *var);