View Single Post
Old 8th August 2007, 12:43
geekman geekman is offline
Join Date: Sep 2006
Location: Sydney, Australia
Posts: 56
Thanks: 1
Thanked 10 Times in 10 Posts
Send a message via ICQ to geekman Send a message via MSN to geekman

Oh yes, it is in fact just a bash script the system will execute, so you need the shebang line. Something like the following:

#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.
mkdir /var/lock/mrtg/
exit 0
You can see here that I have told the system to make the /var/lock/mrtg directory on startup as that was an issue when trying to create a file for mrtg when it started up.

Reply With Quote
Sponsored Links