Erik Andersen | 3695052 | 2000-01-06 01:16:59 +0000 | [diff] [blame] | 1 | # /etc/inittab init(8) configuration for BusyBox |
| 2 | # |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999 by Lineo, inc. and Erik Andersen |
| 4 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> |
Erik Andersen | 3695052 | 2000-01-06 01:16:59 +0000 | [diff] [blame] | 5 | # |
| 6 | # |
| 7 | # Note, BusyBox init doesn't support runlevels. The runlevels field is |
| 8 | # completely ignored by BusyBox init. If you want runlevels, use sysvinit. |
| 9 | # |
| 10 | # |
| 11 | # Format for each entry: <id>:<runlevels>:<action>:<process> |
| 12 | # |
| 13 | # <id>: WARNING: This field has a non-traditional meaning for BusyBox init! |
| 14 | # |
| 15 | # The id field is used by BusyBox init to specify the controlling tty for |
| 16 | # the specified process to run on. The contents of this field are |
| 17 | # appended to "/dev/" and used as-is. There is no need for this field to |
| 18 | # be unique, although if it isn't you may have strange results. If this |
| 19 | # field is left blank, it is completely ignored. Also note that if |
| 20 | # BusyBox detects that a serial console is in use, then all entries |
| 21 | # containing non-empty id fields will _not_ be run. BusyBox init does |
| 22 | # nothing with utmp. We don't need no stinkin' utmp. |
| 23 | # |
| 24 | # <runlevels>: The runlevels field is completely ignored. |
| 25 | # |
Erik Andersen | d7ce5e78 | 2000-02-09 04:40:25 +0000 | [diff] [blame] | 26 | # <action>: Valid actions include: sysinit, respawn, askfirst, wait, once, |
Eric Andersen | 730f826 | 2001-12-17 23:13:08 +0000 | [diff] [blame] | 27 | # restart, ctrlaltdel, and shutdown. |
Erik Andersen | 3695052 | 2000-01-06 01:16:59 +0000 | [diff] [blame] | 28 | # |
| 29 | # Note: askfirst acts just like respawn, but before running the specified |
| 30 | # process it displays the line "Please press Enter to activate this |
| 31 | # console." and then waits for the user to press enter before starting |
| 32 | # the specified process. |
| 33 | # |
| 34 | # Note: unrecognised actions (like initdefault) will cause init to emit |
| 35 | # an error message, and then go along with its business. |
| 36 | # |
| 37 | # <process>: Specifies the process to be executed and it's command line. |
| 38 | # |
Eric Andersen | 3555fd0 | 2001-07-30 19:28:33 +0000 | [diff] [blame] | 39 | # Note: BusyBox init works just fine without an inittab. If no inittab is |
| 40 | # found, it has the following default behavior: |
| 41 | # ::sysinit:/etc/init.d/rcS |
| 42 | # ::askfirst:/bin/sh |
| 43 | # ::ctrlaltdel:/sbin/reboot |
| 44 | # ::shutdown:/sbin/swapoff -a |
| 45 | # ::shutdown:/bin/umount -a -r |
Eric Andersen | 730f826 | 2001-12-17 23:13:08 +0000 | [diff] [blame] | 46 | # ::restart:/sbin/init |
| 47 | # |
Eric Andersen | 3555fd0 | 2001-07-30 19:28:33 +0000 | [diff] [blame] | 48 | # if it detects that /dev/console is _not_ a serial console, it will |
| 49 | # also run: |
| 50 | # tty2::askfirst:/bin/sh |
| 51 | # tty3::askfirst:/bin/sh |
| 52 | # tty4::askfirst:/bin/sh |
Erik Andersen | 3695052 | 2000-01-06 01:16:59 +0000 | [diff] [blame] | 53 | # |
Erik Andersen | 3695052 | 2000-01-06 01:16:59 +0000 | [diff] [blame] | 54 | # Boot-time system configuration/initialization script. |
| 55 | # This is run first except when booting in single-user mode. |
| 56 | # |
| 57 | ::sysinit:/etc/init.d/rcS |
| 58 | |
| 59 | # /bin/sh invocations on selected ttys |
| 60 | # |
Eric Andersen | 7e3bf6e | 2000-09-14 22:01:31 +0000 | [diff] [blame] | 61 | # Note below that we prefix the shell commands with a "-" to indicate to the |
| 62 | # shell that it is supposed to be a login shell. Normally this is handled by |
| 63 | # login, but since we are bypassing login in this case, BusyBox lets you do |
| 64 | # this yourself... |
| 65 | # |
Eric Andersen | 3555fd0 | 2001-07-30 19:28:33 +0000 | [diff] [blame] | 66 | # Start an "askfirst" shell on the console (whatever that may be) |
Eric Andersen | 7e3bf6e | 2000-09-14 22:01:31 +0000 | [diff] [blame] | 67 | ::askfirst:-/bin/sh |
Eric Andersen | 7e3bf6e | 2000-09-14 22:01:31 +0000 | [diff] [blame] | 68 | # Start an "askfirst" shell on /dev/tty2-4 |
| 69 | tty2::askfirst:-/bin/sh |
| 70 | tty3::askfirst:-/bin/sh |
| 71 | tty4::askfirst:-/bin/sh |
Erik Andersen | 3695052 | 2000-01-06 01:16:59 +0000 | [diff] [blame] | 72 | |
| 73 | # /sbin/getty invocations for selected ttys |
Eric Andersen | 3555fd0 | 2001-07-30 19:28:33 +0000 | [diff] [blame] | 74 | tty4::respawn:/sbin/getty 38400 tty5 |
| 75 | tty5::respawn:/sbin/getty 38400 tty6 |
Erik Andersen | 3695052 | 2000-01-06 01:16:59 +0000 | [diff] [blame] | 76 | |
| 77 | # Example of how to put a getty on a serial line (for a terminal) |
Eric Andersen | 3555fd0 | 2001-07-30 19:28:33 +0000 | [diff] [blame] | 78 | #::respawn:/sbin/getty -L ttyS0 9600 vt100 |
| 79 | #::respawn:/sbin/getty -L ttyS1 9600 vt100 |
Erik Andersen | 3695052 | 2000-01-06 01:16:59 +0000 | [diff] [blame] | 80 | # |
| 81 | # Example how to put a getty on a modem line. |
Eric Andersen | 3555fd0 | 2001-07-30 19:28:33 +0000 | [diff] [blame] | 82 | #::respawn:/sbin/getty 57600 ttyS2 |
Erik Andersen | 3695052 | 2000-01-06 01:16:59 +0000 | [diff] [blame] | 83 | |
Eric Andersen | 730f826 | 2001-12-17 23:13:08 +0000 | [diff] [blame] | 84 | # Stuff to do when restarting the init process |
| 85 | ::restart:/sbin/init |
| 86 | |
Erik Andersen | d7ce5e78 | 2000-02-09 04:40:25 +0000 | [diff] [blame] | 87 | # Stuff to do before rebooting |
Eric Andersen | 3555fd0 | 2001-07-30 19:28:33 +0000 | [diff] [blame] | 88 | ::ctrlaltdel:/sbin/reboot |
| 89 | ::shutdown:/bin/umount -a -r |
| 90 | ::shutdown:/sbin/swapoff -a |
Erik Andersen | 3695052 | 2000-01-06 01:16:59 +0000 | [diff] [blame] | 91 | |