#!/bin/sh # Local system initialization script. Put any local startup # commands here. If you have anything that needs to be run # at shutdown time, make an /etc/rc.d/rc.local_shutdown # script and put those commands in there. printf "\033[1;37mrc.local: (additional local settings - outputs logged.)\033[0m\n" # If possible, log events in /var/log/messages.log: if [ -f /var/run/syslogd.pid -a -x /usr/bin/logger ]; then LOGGER=/usr/bin/logger else # otherwise output to stdout/stderr: LOGGER=$(which cat) fi # Delete pam_console lock and refcount files # This function preexisted in here rm -f /var/run/console/* | $LOGGER # install /initialize hardware sensor(s) /usr/bin/sensors -s | $LOGGER # ################# ---- hdparm & SMART ---- ################# # HDA = Seagate 320Gb HD ST-320GB 32-bit-IO DMA-on # HDB Western Digital 14Gb 32-bit IO DMA on # HDC - DVD-ROM (Benq) 32-bit IO DMA on # HDD = Atapi MSI 52x CD-RW/CD-ROM 32-bit IO # ------------------------------- #hdparm -d1 -c1 /dev/hda | $LOGGER #hdparm -d1 -c1 /dev/hdb | $LOGGER #hdparm -d1 -c1 /dev/hdc | $LOGGER #hdparm -c1 /dev/hdd | $LOGGER # ------------------------------- # S.M.A.R.T. starts here instead of /etc/rc.d/rc.M so it starts # AFTER hdparm settings. This logs to tty9 & /var/log/smart.log if [ -x /usr/sbin/smartd ]; then # printf "\033[1;33mStarting S.M.A.R.T. daemon.\033[0m\n" /usr/sbin/smartd --logfacility=local5 fi # ############################################################# # Now, remove old and make new pktcdvd dev-node if [ -e /dev/pktcdvd/udf_cdrw ];then /etc/rc.d/rc.pktcdvd -r 254:0 >/dev/null 2>&1 | $LOGGER fi if [ -e /dev/pktcdvd/udf_dvdrw ];then /etc/rc.d/rc.pktcdvd -r 254:1 >/dev/null 2>&1 | $LOGGER fi /etc/rc.d/rc.pktcdvd -a udf_cdrw /dev/hdc >/dev/null 2>&1 | $LOGGER /etc/rc.d/rc.pktcdvd -a udf_dvdrw /dev/sr0 >/dev/null 2>&1 | $LOGGER chmod 0660 /dev/pktcdvd/* chown root:cdrom /dev/pktcdvd/* # Plug in the scanner parallel port modules: # NOTE - These are currently built-in, as of 2.6.22.5 #modprobe parport_serial #modprobe parport_pc #modprobe parport #rm -f /dev/parport* && rm -f /dev/scanner #mknod -m 0660 /dev/parport0 c 99 0 > /dev/null #chgrp parport /dev/parport0 > /dev/null #ln -s /dev/parport0 /dev/scanner # plug in the kernel module for the Quatech serial card KERNEL=$(uname -r) Q_path=/lib/modules/${KERNEL}/kernel/drivers/serial Q_name='SerQT_PCI.ko' if [ -e $Q_path/$Q_name ]; then echo -ne "\033[1;33mFound Quatech PCI-serial card driver module. Installation " [ -z "$(modprobe SerQT_PCI)" ] && echo -e "successful.\033[0m" || echo -e "failed.\n PCI-serial card is not usable.\033[0m" else echo -e "\033[1;33mNo Quatech PCI-serial card driver found.\033[0m" fi # Plug in the Intel536ep modem module if exists: # NOTE: Not in use-- no longer using modem on this PC Intel_path=/lib/modules/${KERNEL}/kernel/drivers/ I_path1=Intel536 I_path2=char I_name=Intel536.ko if [ -e $Intel_path$I_path1/$I_name ] || [ -e $Intel_path$I_path2/$I_name ] ; then modprobe Intel536 if [ ! -e /dev/modem ]; then ln -s /dev/536ep0 /dev/modem fi if [ ! -e /dev/ppp ]; then mknod /dev/ppp c 108 0 fi else printf "\033[1;33mNo Intel536EP modem driver found.\033[0m\n" fi # Start NTP daemon # now done by rc.ntpd which is called from rc.inet2 # configfile, driftfile, logfile, broadcast-delay, interface. # ntpd -c /etc/ntp.conf -f /etc/ntp/drift -l /var/log/ntp.log # Install Intel CPU Microcode update - default file location is # /etc/microcode.dat [ -x /usr/local/sbin/microcode_ctl ] && \ /usr/local/sbin/microcode_ctl -f /etc/microcode-20080910.dat # Cause X Zap to work: # setxkbmap -option terminate:ctrl_alt_bksp printf "\033[1;32mrc.local: Finished & exiting.\033[0m\n" # EOF