diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/misc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/shared/misc.c b/src/shared/misc.c index fbb50b59..11393d33 100644 --- a/src/shared/misc.c +++ b/src/shared/misc.c @@ -147,6 +147,7 @@ env_config(void) char *path; char *p; char *e; + char *svcdir; size_t l; struct utsname uts; FILE *fp; @@ -187,8 +188,12 @@ env_config(void) setenv("RC_VERSION", VERSION, 1); setenv("RC_LIBEXECDIR", RC_LIBEXECDIR, 1); - setenv("RC_SVCDIR", RC_SVCDIR, 1); - setenv("RC_TMPDIR", RC_SVCDIR "/tmp", 1); + svcdir = rc_svcdir(); + setenv("RC_SVCDIR", svcdir, 1); + xasprintf(&e, "%s/%s", svcdir, "/tmp"); + setenv("RC_TMPDIR", e, 1); + free(e); + free(svcdir); setenv("RC_BOOTLEVEL", RC_LEVEL_BOOT, 1); e = rc_runlevel_get(); setenv("RC_RUNLEVEL", e, 1); |