The rc.local script on my laptop looks like this:
Code: Select all
#!/bin/sh
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local startup commands in here. Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.
# Start vboxdrv
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxdrv ]; then
/etc/rc.d/rc.vboxdrv start
fi
# Disable hard disk load cycling:
hdparm -B 254 /dev/sda
# Reload psmouse module for ALPS touchpads:
if [ "`lsmod | grep psmouse`" ]; then
modprobe -r psmouse ; modprobe psmouse
fi
# Disable wifi power management (for ath9k cards):
if [ "`lsmod | grep ath9k`" ]; then
iwconfig wlan0 power off
fi
# Enable hotplugging:
#modprobe pciehp
modprobe acpiphp
At first I thought this was just the terminal printing the output twice but when I added a line to execute my rc.dhcpd script from rc.local on my server I realised the script was actually being executed twice.
Any ideas?