# set defaults [ -e /etc/rc.defaults ] && . /etc/rc.defaults # include overrides if [ -e /etc/rc.conf ] then . /etc/rc.conf else echo "************************************************************" echo "******************** WARNING ***************************" echo "************************************************************" echo "The file /etc/rc.conf does not exist on your system," echo "so the default configuration will be used." echo "Type 'cfg_rc' at a command prompt" echo "to create /etc/rc.conf to customise your dslinux installation." echo "************************************************************" echo "************************************************************" echo "************************************************************" fi if [ ! "$font" = "" ] then if [ -e "$font" ] then echo "Changing font size to $font" echo "Type 'consolechars -R' to revert" /usr/bin/consolechars -f $font else echo "$font does not exist!" fi fi # /opt is BEFORE /usr/bin to speed up some applications PATH=/bin:/sbin:/opt:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin export PATH # create /etc/passwd if it doesn't exist if [ ! -f /etc/passwd ] then echo "Creating default /etc/passwd" echo "root:xxSVJVBe8UDn2:0:0:Tim Bisley:/home:/bin/sh" > /etc/passwd echo "bin:x:1:1:bin:/bin:" >> /etc/passwd echo "daemon:x:2:2:daemon:/sbin:" >> /etc/passwd echo "nobody:x:99:99:Nobody:/:" >> /etc/passwd fi if [ "$start_syslogd" = "YES" ] then /etc/rc.d/syslogd start else echo "Not starting syslogd" fi if [ "$start_hinged" = "YES" ] then /etc/rc.d/hinged start else echo "Not starting hinged" fi # setup networking if [ "$enable_network_on_boot" = "YES" ] then if /etc/rc.d/network start then __network_up="YES" else __network_up="NO" fi else echo "Not configuring network:" echo "enable_network_on_boot is set to \"$enable_network_on_boot\"" echo "To configure wireless edit /etc/rc.conf or run 'wnc'." __network_up="NO" fi #Start iptables before other services if [ "$start_iptables" = "YES" ] then if [ "$__network_up" = "YES" ] then /etc/rc.d/iptables start else echo "Not starting iptables: network is down" fi fi # Start ntpclient if [ "$start_ntpclient" = "YES" ] then if [ "$__network_up" = "YES" ] then /etc/rc.d/ntpclient start else echo "Not starting ntpclient: network is down" fi fi # start inetd if configured if [ "$start_inetd" = "YES" ] then if [ "$__network_up" = "YES" ] then /etc/rc.d/inetd start else echo "Not starting inetd: network is down" fi fi if [ "$start_openvpn" = "YES" ] then if [ "$__network_up" = "YES" ] then /etc/rc.d/openvpn start else echo "Not starting openvpn: network is down" fi fi if [ "$start_boa" = "YES" ] then if [ "$__network_up" = "YES" ] then /etc/rc.d/boa start else echo "Not starting boa: network is down" fi fi if [ "$start_inadyn" = "YES" ] then if [ "$__network_up" = "YES" ] then /etc/rc.d/inadyn start else echo "Not starting inadyn: network is down" fi fi if [ "$start_esd" = "YES" ] then if [ "$__network_up" = "YES" ] then /etc/rc.d/esd start else echo "Not starting esd: network is down" fi fi # Check for update if specified if [ "$check_update" = "YES" ] then if [ "$__network_up" = "YES" ] then echo "Checking for update" /etc/rc.d/update check else echo "Not checking for update: network is down" fi fi # set hostname hostname $hostname # set up /etc/hosts so networking tools will work echo "127.0.0.1 $hostname" > /etc/hosts # if we have extra RAM, enable 2 extra terminals and gpm exec 0