3 ### rc1, next stage 'rc' for PicoBSD -- THIS IS NOT THE NORMAL /etc/rc
5 . /etc/rc.conf.defaults # Load default procedures
6 rc_conf_set_defaults # Assign default values to variables.
7 find_system_id # Set $main_eth $main_if
8 set_main_interface # Set ${hostname} and ${ifconfig_${main_if}}
9 set_all_interfaces # Set ${ifconfig_${if}} for other interfaces.
11 # Now process local configurations if present. ${hostname} should be set now,
12 # so rc.conf[.local] can make use of a case statement to set per-host things.
14 [ -f /etc/rc.conf ] && . /etc/rc.conf
15 [ -f /etc/rc.conf.local ] && . /etc/rc.conf.local
17 ### Now use some variables to override files in /etc ###
19 [ -n "${host_conf}" ] && echo ${host_conf} > /etc/host.conf
20 [ -n "${resolv_conf}" ] && echo ${resolv_conf} > /etc/resolv.conf
21 [ -n "${rc_local}" ] && echo ${rc_local} > /etc/rc.local
26 if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
27 echo "Adding $swapfile as additional swap."
28 vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
30 echo "No swap partition available!"
32 # configure serial devices
33 [ -f /etc/rc.serial ] && . /etc/rc.serial
35 # start up the initial network configuration.
36 if [ -f /etc/rc.network ]; then
41 # clean up left-over files
42 (cd /var/run && { cp /dev/null utmp; chmod 644 utmp; })
44 [ -n "$network_pass1_done" ] && network_pass2
45 [ -n "$network_pass2_done" ] && network_pass3
47 pwd_mkdb -p ./master.passwd
49 [ -f /etc/syslog.conf -a -f /stand/syslogd ] && \
50 { echo "Starting syslogd."; syslogd ${syslogd_flags} ; }
52 [ "${inetd_enable}" = "YES" -a -f /stand/inetd ] && \
53 { echo "Starting inetd."; inetd ${inetd_flags} ; }
55 [ "${sshd_enable}" = "YES" -a -f /stand/sshd ] && \
56 { echo "Starting sshd..." ; sshd -f /etc/sshd_config ; }