TELINIT
/sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action. The following arguments serve as directives to telinit:
0,1,2,3,4,5 or 6
tell init to switch to the specified run level.
a,b,c
tell init to process only those /etc/inittab file entries having runlevel a,b or c.
Q or q
tell init to re-examine the /etc/inittab file.
S or s
tell init to switch to single user mode.
U or u
tell init to re-execute itself (preserving the state). No re-examining of /etc/inittab file happens. Run level should be one of Ss12345, otherwise request would be silently ignored.
telinit can also tell init how long it should wait between sending processes the SIGTERM and SIGKILL signals. The default is 5 seconds, but this can be changed with the -t sec option.
telinit can be invoked only by users with appropriate privileges.
The init binary checks if it is init or telinit by looking at its process id; the real init's process id is always 1. From this it follows that instead of calling telinit one can also just use init instead as a shortcut.
阅读(951) | 评论(0) | 转发(0) |