aboutsummaryrefslogtreecommitdiff
path: root/src/librc-misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/librc-misc.c')
-rw-r--r--src/librc-misc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/librc-misc.c b/src/librc-misc.c
index 36d9b318..ecb403a0 100644
--- a/src/librc-misc.c
+++ b/src/librc-misc.c
@@ -572,7 +572,7 @@ char **rc_config_env (char **env)
char *line;
int i;
char *p;
- char **config = rc_get_config (NULL, RC_CONFIG);
+ char **config;
char *e;
char sys[6];
struct utsname uts;
@@ -580,6 +580,13 @@ char **rc_config_env (char **env)
FILE *fp;
char buffer[PATH_MAX];
+ /* Don't trust environ for softlevel yet */
+ snprintf (buffer, PATH_MAX, "%s.%s", RC_CONFIG, rc_get_runlevel());
+ if (rc_exists (buffer))
+ config = rc_get_config (NULL, buffer);
+ else
+ config = rc_get_config (NULL, RC_CONFIG);
+
STRLIST_FOREACH (config, line, i) {
p = strchr (line, '=');
if (! p)