Fix markup.
[netbsd-mini2440.git] / etc / rc
blob947820b936e6614b111db6eb25fe7b88ac32365a
1 #!/bin/sh
3 # $NetBSD: rc,v 1.162 2003/01/04 15:27:43 lukem Exp $
5 # rc --
6 # Run the scripts in /etc/rc.d with rcorder.
8 # System startup script run by init(8) on autoboot or after single-user.
9 # Output and error are redirected to console by init, and the console
10 # is the controlling terminal.
12 export HOME=/
13 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
14 umask 022
16 . /etc/rc.subr
17 . /etc/rc.conf
18 _rc_conf_loaded=true
20 if ! checkyesno rc_configured; then
21 echo "/etc/rc.conf is not configured. Multiuser boot aborted."
22 exit 1
25 if [ "$1" = autoboot ]; then
26 autoboot=yes
27 rc_fast=yes # run_rc_command(): do fast booting
30 stty status '^T'
32 # Set shell to ignore SIGINT, but not children;
33 # shell catches SIGQUIT and returns to single user.
35 trap : INT
36 trap "echo 'Boot interrupted.'; exit 1" QUIT
38 date
40 scripts=$(for rcd in ${rc_directories:-/etc/rc.d}; do
41 test -d ${rcd} && echo ${rcd}/*;
42 done)
43 files=$(rcorder -s nostart ${rc_rcorder_flags} ${scripts})
45 for _rc_elem in $files; do
46 run_rc_script $_rc_elem start
47 done
49 date
50 exit 0