I am by no means a programmer. Using SUSE I found a script that creates the equivalent to having a rc.local file, found here:
http://linux.derkeiler.com/Mailing-L...5-07/1773.html.
I was wondering if anyone could explain how this script works too me.
This is what the mail-list says to do:
Steps to simulate rc.local in Suse:
1) Create a "/etc/rc.d/rclocal" script, with this content:
----------------------------
#! /bin/sh
## This script simulates redhat's rc.local (Add commands at the end)
### BEGIN INIT INFO
# Provides: rclocal
# Required-Start: $local_fs $remote_fs $network
# X-UnitedLinux-Should-Start: $ALL
# Required-Stop:
# X-UnitedLinux-Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Simulates rc.local
# Description: Simulates redhat's rc.local: contains
# commands to execute after system has booted (all services are already
# available)
### END INIT INFO
## Execute ony when service is started
case "$1" in
start)
## commands will be executed
;;
*)
exit 0
;;
esac
# vvvvv Add your commands bellow this line vvvvv
----------------------------
2) Add executable permision: chmod +x rclocal
3) Create symlink to make it easy to find: ln -s rclocal rc.local
4) Activate the service by using yast2:
yast2 > System > Runlevel editor > rclocal > Enable
You can add/remove commands to /etc/rc.d/rc.local anytime you wish.
So what I did and what my problem is:
I opened up Kate editor and followed step 1 exactly character for character. Where it says "add your commands bellow this line vvvv" I typed ' route add 192.168.0.1 gw 30.38.72.50 ' (without ''). This part confused me, because doesn't the command need to be where it says ## commands will be executed?
Step 2 and 3 worked no problem
on step 4, when I tried to activate the script it gave me the error message:
/etc/init.d/relocal start returned 7 (program is not running)
Did I implement that line of code incorrectly?