diff options
author | Roy Marples <roy@marples.name> | 2008-03-21 10:34:09 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-03-21 10:34:09 +0000 |
commit | fe90a548b547fd87643e3dc1ab87fbb45dc94456 (patch) | |
tree | 03a8639b0f36340887ee12feef6f2109fd3dd116 /src/rc | |
parent | 494fb0a5f6df3c8da636f4db057fbb3994c1ad6c (diff) |
ksoftlevel -> krunlevel
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/rc.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c index 85ab5578..7b3d9015 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -358,7 +358,7 @@ static void single_user(void) applet, strerror(errno)); } -static bool set_ksoftlevel(const char *level) +static bool set_krunlevel(const char *level) { FILE *fp; @@ -383,7 +383,7 @@ static bool set_ksoftlevel(const char *level) return true; } -static int get_ksoftlevel(char *buffer, int buffer_len) +static int get_krunlevel(char *buffer, int buffer_len) { FILE *fp; int i = 0; @@ -690,9 +690,9 @@ static void do_newlevel(const char *newlevel) #ifdef __linux__ /* If we requested a softlevel, save it now */ - set_ksoftlevel(NULL); + set_krunlevel(NULL); if ((cmd = proc_getent("softlevel"))) { - set_ksoftlevel(cmd); + set_krunlevel(cmd); free(cmd); } #endif @@ -714,7 +714,7 @@ static void do_newlevel(const char *newlevel) strcmp(RUNLEVEL, "1") != 0)) { /* Remember the current runlevel for when we come back */ - set_ksoftlevel(runlevel); + set_krunlevel(runlevel); single_user(); } #endif @@ -921,7 +921,7 @@ int main(int argc, char **argv) RC_STRING *service; bool going_down = false; int depoptions = RC_DEP_STRICT | RC_DEP_TRACE; - char ksoftbuffer [PATH_MAX]; + char krunlevel [PATH_MAX]; char pidstr[6]; int opt; bool parallel; @@ -978,7 +978,7 @@ int main(int argc, char **argv) case 'o': if (*optarg == '\0') optarg = NULL; - exit(set_ksoftlevel(optarg) ? EXIT_SUCCESS : EXIT_FAILURE); + exit(set_krunlevel(optarg) ? EXIT_SUCCESS : EXIT_FAILURE); /* NOTREACHED */ case 's': newlevel = rc_service_resolve(optarg); @@ -1029,24 +1029,24 @@ int main(int argc, char **argv) /* Now we start handling our children */ signal_setup(SIGCHLD, handle_signal); - /* We should only use ksoftlevel if we were in single user mode - * If not, we need to erase ksoftlevel now. */ + /* We should only use krunlevel if we were in single user mode + * If not, we need to erase krunlevel now. */ if (PREVLEVEL && (strcmp(PREVLEVEL, "1") == 0 || strcmp(PREVLEVEL, "S") == 0 || strcmp(PREVLEVEL, "N") == 0)) { - /* Try not to join boot and ksoftlevels together */ + /* Try not to join boot and krunlevels together */ if (! newlevel || strcmp(newlevel, getenv("RC_BOOTLEVEL")) != 0) - if (get_ksoftlevel(ksoftbuffer, sizeof(ksoftbuffer))) - newlevel = ksoftbuffer; + if (get_krunlevel(krunlevel, sizeof(krunlevel))) + newlevel = krunlevel; } else if (! RUNLEVEL || (strcmp(RUNLEVEL, "1") != 0 && strcmp(RUNLEVEL, "S") != 0 && strcmp(RUNLEVEL, "N") != 0)) { - set_ksoftlevel(NULL); + set_krunlevel(NULL); } if (newlevel && |