cleanups on handling SIGHUP; other nits
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 3 Jun 1993 07:40:24 +0000 (23:40 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 3 Jun 1993 07:40:24 +0000 (23:40 -0800)
SCCS-vsn: sbin/init/init.8 6.7

usr/src/sbin/init/init.8

index 327b02a..a155aee 100644 (file)
@@ -6,7 +6,7 @@
 .\"
 .\" %sccs.include.redist.roff%
 .\"
 .\"
 .\" %sccs.include.redist.roff%
 .\"
-.\"     @(#)init.8     6.6 (Berkeley) %G%
+.\"     @(#)init.8     6.7 (Berkeley) %G%
 .\"
 .Dd 
 .Dt INIT 8
 .\"
 .Dd 
 .Dt INIT 8
@@ -25,7 +25,7 @@ It normally runs the automatic reboot sequence as described in
 .Xr reboot 8 ,
 and if this succeeds, begins multi-user operation.
 If the reboot scripts fail,
 .Xr reboot 8 ,
 and if this succeeds, begins multi-user operation.
 If the reboot scripts fail,
-.Fn init
+.Nm init
 commences single user operation by giving
 the super-user a shell on the console.
 The
 commences single user operation by giving
 the super-user a shell on the console.
 The
@@ -36,7 +36,7 @@ prevent the system from going multi-user and to instead execute
 a single user shell without starting the normal daemons.
 The system is then quiescent for maintenance work and may
 later be made to go to multi-user by exiting the
 a single user shell without starting the normal daemons.
 The system is then quiescent for maintenance work and may
 later be made to go to multi-user by exiting the
-the single-user shell (with ^D).
+single-user shell (with ^D).
 This
 causes
 .Nm init
 This
 causes
 .Nm init
@@ -97,22 +97,12 @@ the administrator must build a kernel with the variable
 in the kernel source file
 .Pa /sys/kern/kern_sysctl.c
 initialized to -1.
 in the kernel source file
 .Pa /sys/kern/kern_sysctl.c
 initialized to -1.
-Note that it is NOT initialized to zero, as that would allow the
-.Nm securelevel
-variable in the
-.Nm vmunix
-binary to be patched to -1.
-Without initialization,
-.Nm securelevel
-loads in the initialized-to-zero region that only
-comes into existence when the kernel is loaded and
-hence cannot be patched by a stalking hacker.
 .Pp
 In multi-user operation, 
 .Nm init
 maintains
 processes for the terminal ports found in the file
 .Pp
 In multi-user operation, 
 .Nm init
 maintains
 processes for the terminal ports found in the file
-.Xr ttys 5.
+.Xr ttys 5 .
 .Nm Init
 reads this file, and executes the command found in the second field.
 This command is usually
 .Nm Init
 reads this file, and executes the command found in the second field.
 This command is usually
@@ -144,36 +134,44 @@ executing a new
 .Xr getty
 for the line.
 .Pp
 .Xr getty
 for the line.
 .Pp
-Lines may be added or deleted from the
+Line status (on, off, secure, getty, or window information)
+may be changed in the
 .Xr ttys
 file without a reboot by sending the signal
 .Dv SIGHUP
 to
 .Nm init
 with the command
 .Xr ttys
 file without a reboot by sending the signal
 .Dv SIGHUP
 to
 .Nm init
 with the command
-.Dq Li "kill -HUP 1"
+.Dq Li "kill -HUP 1" .
 On receipt of this signal,
 .Nm init
 re-reads the
 .Xr ttys
 file.
 On receipt of this signal,
 .Nm init
 re-reads the
 .Xr ttys
 file.
-Engaged (in use) ports
-are not disturbed,
-and if an engaged port has been deleted from the
-file, it will only become inactive after the engaging process has
-terminated (the user has logged off).
-If a port is inactive (only a
-.Xr getty
-or terminated processes are attached to it)
+When a line is turned off in
+.Xr ttys ,
 .Nm init
 .Nm init
-eliminates these processes.
-For these ports and any new ports, for which a command is found
-in the
+will send a SIGHUP signal to the controlling process
+for the session associated with the line.
+For any lines that were previously turned off in the
 .Xr ttys
 file,
 .Nm init
 executes a new
 .Xr ttys
 file,
 .Nm init
 executes a new
-.Xr getty .
+.Xr getty
+too enable a new login.
+If the getty or window field for a line is changed,
+the change takes effect at the beginning of the next
+login session (e.g., the next time 
+.Nm init
+starts a process on the line).
+If a line is commented out or deleted from
+.Xr ttys ,
+.Nm init
+will not do anything at all to that line.
+However, it will complain that the association between lines
+and the utmp is out of sync,
+so this practice is not recommended.
 .Pp
 .Nm Init
 will terminate multi-user operations and resume single-user mode
 .Pp
 .Nm Init
 will terminate multi-user operations and resume single-user mode
@@ -207,18 +205,18 @@ is so critical that if it dies, the system will reboot itself
 automatically.
 If, at bootstrap time, the
 .Xr init
 automatically.
 If, at bootstrap time, the
 .Xr init
-process cannot be located, the system will loop in user mode at location
-0x13.
+process cannot be located, the system will panic with the message
+``panic: "init died (signal %d, exit %d)''.
 .Sh DIAGNOSTICS
 .Bl -diag
 .Sh DIAGNOSTICS
 .Bl -diag
-.It "/usr/libexec/getty \\*(eMgettyargs\\*(fP failing, sleeping."
+.It "getty repeating too quickly on port %s, sleeping"
 A process being started to service a line is exiting quickly
 each time it is started.
 This is often caused by a ringing or noisy terminal line.
 A process being started to service a line is exiting quickly
 each time it is started.
 This is often caused by a ringing or noisy terminal line.
-.Em "Init will sleep for 30 seconds" ,
+.Em "Init will sleep for 10 seconds" ,
 .Em "then continue trying to start the process" .
 .Pp
 .Em "then continue trying to start the process" .
 .Pp
-.It "WARNING: Something is hung (wont die); ps axl advised."
+.It "some processes would not die; ps axl advised."
 A process
 is hung and could not be killed when the system was shutting down.
 This condition is usually caused by a process
 A process
 is hung and could not be killed when the system was shutting down.
 This condition is usually caused by a process