/etc/conf.d/rc.$runlevel now works, #177869.
This commit is contained in:
parent
b20d600e49
commit
fc597a8721
@ -572,7 +572,7 @@ char **rc_config_env (char **env)
|
|||||||
char *line;
|
char *line;
|
||||||
int i;
|
int i;
|
||||||
char *p;
|
char *p;
|
||||||
char **config = rc_get_config (NULL, RC_CONFIG);
|
char **config;
|
||||||
char *e;
|
char *e;
|
||||||
char sys[6];
|
char sys[6];
|
||||||
struct utsname uts;
|
struct utsname uts;
|
||||||
@ -580,6 +580,13 @@ char **rc_config_env (char **env)
|
|||||||
FILE *fp;
|
FILE *fp;
|
||||||
char buffer[PATH_MAX];
|
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) {
|
STRLIST_FOREACH (config, line, i) {
|
||||||
p = strchr (line, '=');
|
p = strchr (line, '=');
|
||||||
if (! p)
|
if (! p)
|
||||||
|
@ -975,6 +975,9 @@ int main (int argc, char **argv)
|
|||||||
int opt;
|
int opt;
|
||||||
|
|
||||||
service = argv[1];
|
service = argv[1];
|
||||||
|
applet = rc_xstrdup (basename (service));
|
||||||
|
atexit (cleanup);
|
||||||
|
|
||||||
/* Show help if insufficient args */
|
/* Show help if insufficient args */
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
execl (RCSCRIPT_HELP, RCSCRIPT_HELP, service, (char *) NULL);
|
execl (RCSCRIPT_HELP, RCSCRIPT_HELP, service, (char *) NULL);
|
||||||
@ -982,9 +985,6 @@ int main (int argc, char **argv)
|
|||||||
applet, strerror (errno));
|
applet, strerror (errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
applet = rc_xstrdup (basename (service));
|
|
||||||
atexit (cleanup);
|
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
/* coldplug events can trigger init scripts, but we don't want to run them
|
/* coldplug events can trigger init scripts, but we don't want to run them
|
||||||
until after rc sysinit has completed so we punt them to the boot runlevel */
|
until after rc sysinit has completed so we punt them to the boot runlevel */
|
||||||
|
Loading…
Reference in New Issue
Block a user