📄 rc.local
字号:
# 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 bpsif [ -e /dev/modem ]then echo -n "high-speed-modem " setserial /dev/modem spd_hifi# 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 existif [ -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 fifi# Start up cron if it existsif [ -f /usr/sbin/cron ]then echo -n "cron " /usr/sbin/cronfi 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 fifi echo "Mounting foreign file systems"mount -avt nfs,msdos,hpfs# Create a new issue fileecho > /etc/issueecho "Welcome to `hostname`, an `uname -m` running BOGUS Release 1.0.1 `uname` `uname -r`" >> /etc/issueecho >> /etc/issue
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -