diff options
Diffstat (limited to 'init/init.c')
-rw-r--r-- | init/init.c | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/init/init.c b/init/init.c index 4d6355167..ab137a981 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -10,38 +10,38 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | //config:config INIT | 12 | //config:config INIT |
13 | //config: bool "init" | 13 | //config: bool "init (9.3 kb)" |
14 | //config: default y | 14 | //config: default y |
15 | //config: select FEATURE_SYSLOG | 15 | //config: select FEATURE_SYSLOG |
16 | //config: help | 16 | //config: help |
17 | //config: init is the first program run when the system boots. | 17 | //config: init is the first program run when the system boots. |
18 | //config: | 18 | //config: |
19 | //config:config LINUXRC | 19 | //config:config LINUXRC |
20 | //config: bool "linuxrc: support running init from initrd (not initramfs)" | 20 | //config: bool "linuxrc: support running init from initrd (not initramfs)" |
21 | //config: default y | 21 | //config: default y |
22 | //config: select FEATURE_SYSLOG | 22 | //config: select FEATURE_SYSLOG |
23 | //config: help | 23 | //config: help |
24 | //config: Legacy support for running init under the old-style initrd. Allows | 24 | //config: Legacy support for running init under the old-style initrd. Allows |
25 | //config: the name linuxrc to act as init, and it doesn't assume init is PID 1. | 25 | //config: the name linuxrc to act as init, and it doesn't assume init is PID 1. |
26 | //config: | 26 | //config: |
27 | //config: This does not apply to initramfs, which runs /init as PID 1 and | 27 | //config: This does not apply to initramfs, which runs /init as PID 1 and |
28 | //config: requires no special support. | 28 | //config: requires no special support. |
29 | //config: | 29 | //config: |
30 | //config:config FEATURE_USE_INITTAB | 30 | //config:config FEATURE_USE_INITTAB |
31 | //config: bool "Support reading an inittab file" | 31 | //config: bool "Support reading an inittab file" |
32 | //config: default y | 32 | //config: default y |
33 | //config: depends on INIT || LINUXRC | 33 | //config: depends on INIT || LINUXRC |
34 | //config: help | 34 | //config: help |
35 | //config: Allow init to read an inittab file when the system boot. | 35 | //config: Allow init to read an inittab file when the system boot. |
36 | //config: | 36 | //config: |
37 | //config:config FEATURE_KILL_REMOVED | 37 | //config:config FEATURE_KILL_REMOVED |
38 | //config: bool "Support killing processes that have been removed from inittab" | 38 | //config: bool "Support killing processes that have been removed from inittab" |
39 | //config: default n | 39 | //config: default n |
40 | //config: depends on FEATURE_USE_INITTAB | 40 | //config: depends on FEATURE_USE_INITTAB |
41 | //config: help | 41 | //config: help |
42 | //config: When respawn entries are removed from inittab and a SIGHUP is | 42 | //config: When respawn entries are removed from inittab and a SIGHUP is |
43 | //config: sent to init, this option will make init kill the processes | 43 | //config: sent to init, this option will make init kill the processes |
44 | //config: that have been removed. | 44 | //config: that have been removed. |
45 | //config: | 45 | //config: |
46 | //config:config FEATURE_KILL_DELAY | 46 | //config:config FEATURE_KILL_DELAY |
47 | //config: int "How long to wait between TERM and KILL (0 - send TERM only)" if FEATURE_KILL_REMOVED | 47 | //config: int "How long to wait between TERM and KILL (0 - send TERM only)" if FEATURE_KILL_REMOVED |
@@ -49,34 +49,34 @@ | |||
49 | //config: default 0 | 49 | //config: default 0 |
50 | //config: depends on FEATURE_KILL_REMOVED | 50 | //config: depends on FEATURE_KILL_REMOVED |
51 | //config: help | 51 | //config: help |
52 | //config: With nonzero setting, init sends TERM, forks, child waits N | 52 | //config: With nonzero setting, init sends TERM, forks, child waits N |
53 | //config: seconds, sends KILL and exits. Setting it too high is unwise | 53 | //config: seconds, sends KILL and exits. Setting it too high is unwise |
54 | //config: (child will hang around for too long and could actually kill | 54 | //config: (child will hang around for too long and could actually kill |
55 | //config: the wrong process!) | 55 | //config: the wrong process!) |
56 | //config: | 56 | //config: |
57 | //config:config FEATURE_INIT_SCTTY | 57 | //config:config FEATURE_INIT_SCTTY |
58 | //config: bool "Run commands with leading dash with controlling tty" | 58 | //config: bool "Run commands with leading dash with controlling tty" |
59 | //config: default y | 59 | //config: default y |
60 | //config: depends on INIT || LINUXRC | 60 | //config: depends on INIT || LINUXRC |
61 | //config: help | 61 | //config: help |
62 | //config: If this option is enabled, init will try to give a controlling | 62 | //config: If this option is enabled, init will try to give a controlling |
63 | //config: tty to any command which has leading hyphen (often it's "-/bin/sh"). | 63 | //config: tty to any command which has leading hyphen (often it's "-/bin/sh"). |
64 | //config: More precisely, init will do "ioctl(STDIN_FILENO, TIOCSCTTY, 0)". | 64 | //config: More precisely, init will do "ioctl(STDIN_FILENO, TIOCSCTTY, 0)". |
65 | //config: If device attached to STDIN_FILENO can be a ctty but is not yet | 65 | //config: If device attached to STDIN_FILENO can be a ctty but is not yet |
66 | //config: a ctty for other session, it will become this process' ctty. | 66 | //config: a ctty for other session, it will become this process' ctty. |
67 | //config: This is not the traditional init behavour, but is often what you want | 67 | //config: This is not the traditional init behavour, but is often what you want |
68 | //config: in an embedded system where the console is only accessed during | 68 | //config: in an embedded system where the console is only accessed during |
69 | //config: development or for maintenance. | 69 | //config: development or for maintenance. |
70 | //config: NB: using cttyhack applet may work better. | 70 | //config: NB: using cttyhack applet may work better. |
71 | //config: | 71 | //config: |
72 | //config:config FEATURE_INIT_SYSLOG | 72 | //config:config FEATURE_INIT_SYSLOG |
73 | //config: bool "Enable init to write to syslog" | 73 | //config: bool "Enable init to write to syslog" |
74 | //config: default y | 74 | //config: default y |
75 | //config: depends on INIT || LINUXRC | 75 | //config: depends on INIT || LINUXRC |
76 | //config: help | 76 | //config: help |
77 | //config: If selected, some init messages are sent to syslog. | 77 | //config: If selected, some init messages are sent to syslog. |
78 | //config: Otherwise, they are sent to VT #5 if linux virtual tty is detected | 78 | //config: Otherwise, they are sent to VT #5 if linux virtual tty is detected |
79 | //config: (if not, no separate logging is done). | 79 | //config: (if not, no separate logging is done). |
80 | //config: | 80 | //config: |
81 | //config:config FEATURE_INIT_QUIET | 81 | //config:config FEATURE_INIT_QUIET |
82 | //config: bool "Be quiet on boot (no 'init started:' message)" | 82 | //config: bool "Be quiet on boot (no 'init started:' message)" |
@@ -88,37 +88,37 @@ | |||
88 | //config: default n # not Y because this is a debug option | 88 | //config: default n # not Y because this is a debug option |
89 | //config: depends on INIT || LINUXRC | 89 | //config: depends on INIT || LINUXRC |
90 | //config: help | 90 | //config: help |
91 | //config: If this option is enabled and the file /.init_enable_core | 91 | //config: If this option is enabled and the file /.init_enable_core |
92 | //config: exists, then init will call setrlimit() to allow unlimited | 92 | //config: exists, then init will call setrlimit() to allow unlimited |
93 | //config: core file sizes. If this option is disabled, processes | 93 | //config: core file sizes. If this option is disabled, processes |
94 | //config: will not generate any core files. | 94 | //config: will not generate any core files. |
95 | //config: | 95 | //config: |
96 | //config:config INIT_TERMINAL_TYPE | 96 | //config:config INIT_TERMINAL_TYPE |
97 | //config: string "Initial terminal type" | 97 | //config: string "Initial terminal type" |
98 | //config: default "linux" | 98 | //config: default "linux" |
99 | //config: depends on INIT || LINUXRC | 99 | //config: depends on INIT || LINUXRC |
100 | //config: help | 100 | //config: help |
101 | //config: This is the initial value set by init for the TERM environment | 101 | //config: This is the initial value set by init for the TERM environment |
102 | //config: variable. This variable is used by programs which make use of | 102 | //config: variable. This variable is used by programs which make use of |
103 | //config: extended terminal capabilities. | 103 | //config: extended terminal capabilities. |
104 | //config: | 104 | //config: |
105 | //config: Note that on Linux, init attempts to detect serial terminal and | 105 | //config: Note that on Linux, init attempts to detect serial terminal and |
106 | //config: sets TERM to "vt102" if one is found. | 106 | //config: sets TERM to "vt102" if one is found. |
107 | //config: | 107 | //config: |
108 | //config:config FEATURE_INIT_MODIFY_CMDLINE | 108 | //config:config FEATURE_INIT_MODIFY_CMDLINE |
109 | //config: bool "Clear init's command line" | 109 | //config: bool "Clear init's command line" |
110 | //config: default y | 110 | //config: default y |
111 | //config: depends on INIT || LINUXRC | 111 | //config: depends on INIT || LINUXRC |
112 | //config: help | 112 | //config: help |
113 | //config: When launched as PID 1 and after parsing its arguments, init | 113 | //config: When launched as PID 1 and after parsing its arguments, init |
114 | //config: wipes all the arguments but argv[0] and rewrites argv[0] to | 114 | //config: wipes all the arguments but argv[0] and rewrites argv[0] to |
115 | //config: contain only "init", so that its command line appears solely as | 115 | //config: contain only "init", so that its command line appears solely as |
116 | //config: "init" in tools such as ps. | 116 | //config: "init" in tools such as ps. |
117 | //config: If this option is set to Y, init will keep its original behavior, | 117 | //config: If this option is set to Y, init will keep its original behavior, |
118 | //config: otherwise, all the arguments including argv[0] will be preserved, | 118 | //config: otherwise, all the arguments including argv[0] will be preserved, |
119 | //config: be they parsed or ignored by init. | 119 | //config: be they parsed or ignored by init. |
120 | //config: The original command-line used to launch init can then be | 120 | //config: The original command-line used to launch init can then be |
121 | //config: retrieved in /proc/1/cmdline on Linux, for example. | 121 | //config: retrieved in /proc/1/cmdline on Linux, for example. |
122 | 122 | ||
123 | //applet:IF_INIT(APPLET(init, BB_DIR_SBIN, BB_SUID_DROP)) | 123 | //applet:IF_INIT(APPLET(init, BB_DIR_SBIN, BB_SUID_DROP)) |
124 | //applet:IF_LINUXRC(APPLET_ODDNAME(linuxrc, init, BB_DIR_ROOT, BB_SUID_DROP, linuxrc)) | 124 | //applet:IF_LINUXRC(APPLET_ODDNAME(linuxrc, init, BB_DIR_ROOT, BB_SUID_DROP, linuxrc)) |