mmartin n00b
Joined: 08 Nov 2002 Posts: 45
|
Posted: Mon Mar 03, 2003 8:56 pm Post subject: rc.script help please |
|
|
Hi there,
I read thru the rc.script guide and made the following script:
Code: |
#!/sbin/runscript
depend() {
need net
}
start() {
ebegin "Starting VPN (Studenteheim Donaufeld)"
/usr/sbin/pptp-command start donaufeld
/sbin/route del default
/sbin/route add default gw 192.168.10.1
eend $? "Failed to start VPN (Studentenheim Donaufeld)"
}
stop() {
ebegin "Stopping VPN (Studenteheim Donaufeld)"
/sbin/route del default
/usr/sbin/pptp-command stop donaufeld
eend $? "Failed to stop VPN (Studentenheim Donaufeld)"
}
|
Now my first question is, is the "need net" ok when i want the script to start after the network is up, i havent found any info on which keywords i can use so i just guessed, but I think its ok since need net appears in the rc-script guide.
2.) can i simply start the script the way I did? I read something about passing options but didn't get the point, sry lack of english
3.) the sample script does "kill (cat /var/foo.pid)", do I have to do that for some reason or is it ok to just let the pptp client shutdown?
the goal is to just type rc-update add vpn default to have my vpn connectin started at boot up after the network is up.
pls help me I know lots of questions but hey at least I'm trying _________________ thxMartin
Man honest. Will do everything.
Tired of cleaning yourself? - Let me do it.
Eat a frog in the morning and nothing worse will happen to you that day |
|