ninit-runlevel(8)

NAME
ninit-runlevel - set runlevels for compatibility with SysVinit

SYNOPSIS
ninit-runlevel LEVEL [OPTION]... [-] [NAME=VALUE]... [PROGRAM [ARG]...]
ninit-runlevel

DESCRIPTION
ninit-runlevel is a helper program to start service (script, program) with the same environ as SysVinit. It also modifies the files /var/run/utmp and /var/log/wtmp writing runlevel records in them. It is used mainly in ninit-inittab(8) output script. It sets the following variables: INIT_VERSION=2.86, CONSOLE=/dev/console, RUNLEVEL, PREVLEVEL, PATH=/bin:/usr/bin:/sbin:/usr/sbin. The variable NINIT_RUNLEVEL always has the same value as RUNLEVEL. The program does not modify or reset the variable INIT_HALT.

OPTIONS
Actually ninit-runlevel has the same syntax between LEVEL and PROGRAM as the command env(1). If ninit-runlevel is started as a service you can use environ file to set some environment variables. However in this case ninit-runlevel overwrites the variables: INIT_VERSION, CONSOLE, RUNLEVEL, PREVLEVEL, PATH and NINIT_RUNLEVEL. You can reset some of them, for example PATH.

-i  start with an empty environment
    a mere - implies -i

-u  variable
    remove the variable from the environment

EXAMPLES
In the next examples we modify PATH, INIT_HALT and CONSOLE ninit-runlevel S PATH=/sbin:/bin /etc/rc.d/rc.single
ninit-runlevel 0 INIT_HALT=POWERDOWN -u CONSOLE /etc/rc.d/rc.halt See the environ with (don't start it as root - the program will then modify /var/run/utmp ) ninit-runlevel 5 /usr/bin/env

WARNING
Don't remove the file /var/run/utmp if you want correct PREVLEVEL and RUNLEVEL variables. ninit-runlevel stores the info about levels there. ninit does not use the /var/run/utmp file, nor PREVLEVEL, RUNLEVEL, NINIT_RUNLEVEL.

FILES
/var/run/utmp
/var/log/wtmp

SEE ALSO
utmp(5), env(1), runlevel(8)
ninit(8), ninit-sysvinit(8), ninit-shutdown(8), ninit-inittab(8)
init(1), shutdown(8), reboot(8), halt(8)