summaryrefslogtreecommitdiffstats
path: root/example.files/rc.local
blob: 190242d5d167eadf7d83a703784c878483e5bff5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# rc.local file for The Linux BOGUS Release, version 1.0.1

                                echo -n "Local initialization: "

# Set the host name.  You will probably want to change this.
                                echo -n "hostname "
hostname winter

# Update the system time from the CMOS clock.
# This assume that the CMOS clock is in local time, and that you have the
# correct links in /usr/src/zoneinfo (see zic(8) for details.  (For example,
# for the east coast of the US, do: zic -l US/Eastern -p America/NewYork)
# Note: mount /usr BEFORE running rc.local!
                                echo -n "clock "
clock -a

# Set screen blanker to 5 minutes.
                                echo -n "screen-blanking "
setterm -blank 5

# Set modem for 57600 bps
if [ -e /dev/modem ]
then
                                echo -n "high-speed-modem "
    setserial /dev/modem spd_hi
fi

# Make the keyboard repeat rate and delay reasonable.
                                echo -n "keyboard "
kbdrate -r 24 -d 250 >& /dev/null

# Make CTRL-ALT-DEL do a controlled reboot (i.e., call reboot(8))
                                echo -n "reboot "
ctrlaltdel soft

# Preserve elvis files in case of a crash
                                echo -n "vi-files "
elvprsv "-the system went down" /tmp/elv_*.*

                                echo


                                echo -n "Starting daemons: "

# Make sure log files exist
if [ -d /var/adm ]; then
	if [ ! -e /var/adm/kernlog ];  then touch /var/adm/kernlog;  fi
	if [ ! -e /var/adm/syslog ];   then touch /var/adm/syslog;   fi
	if [ ! -e /var/adm/maillog ];  then touch /var/adm/maillog;  fi
	if [ ! -e /var/adm/authlog ];  then touch /var/adm/authlog;  fi
	if [ ! -e /var/adm/news ];     then touch /var/adm/news;     fi
	if [ ! -e /var/adm/daemon ];   then touch /var/adm/daemon;   fi
	if [ ! -e /var/adm/lpd-errs ]; then touch /var/adm/lpd-errs; fi
	if [ ! -e /var/adm/sysdebug ]; then touch /var/adm/sysdebug; fi

	# start up syslogd if it exists, but wait until AFTER HOSTNAME SET
	if [ -f /usr/sbin/syslogd ]; then
                                echo -n "syslogd "
		/usr/sbin/syslogd
	fi
fi

# Start up cron if it exists
if [ -f /usr/sbin/cron ]
then
                                echo -n "cron "
	/usr/sbin/cron
fi

                                echo

# If you want networking turned on, then uncomment the following lines.
if [ -f /etc/NETWORKING_IS_ON ]
then
        if [ -f /etc/rc.net ]
        then
                /bin/sh /etc/rc.net
        fi
fi

                                echo "Mounting foreign file systems"
mount -avt nfs,msdos,hpfs

# Create a new issue file
echo > /etc/issue
echo "Welcome to `hostname`, an `uname -m` running BOGUS Release 1.0.1 `uname` `uname -r`" >> /etc/issue
echo >> /etc/issue