VGZ
Registered
Hey everybody. I\\\'m trying to create a startup service to activate the port of Roaring Penguin PPPoE found at http://media.helioshealth.net:8080/ at startup. I\\\'ve got the startup parameter file created and have started working on a script. My only problem is I have never worked with shell and/or perl scripts before.
This is what I\\\'ve got so far (this is partially copied from the scripts in the other startup services and a script found on www.ResExellence.com):
#!/bin/sh
. /etc/rc.common
PATH=usr/local/bin:$PATH;export PATH
##
# Start up PPPoE deamon
##
if [ \\\"${PPPoE:=-NO-}\\\" = \\\"-YES-\\\" ]; then
{
ConsoleMessage \\\"Starting PPPoE\\\"
/usr/sbin/adsl-start;
$status = `/usr/sbin/adsl-status`;
($part1, $part2) = split(/--> /,$status);
($ip, $netmask) = split(/ netmask/,$part2);
route add default $ip;
}
fi
The way the port of PPPoE works is that you run the following commands as root:
/usr/sbin/adsl-start
/usr/sbin/adsl-status
After running adsl-status you have to manually add the ip address it returns by running:
route add default yyy.yyy.yyy.yyy where yyy.yyy.yyy.yyy is the ip in the result of adsl-status.
The way I set it up is so that it will only run if you set it to in hostconfig. The script doesn\\\'t run right now and I was hoping that someone could help me get it cleared up. When I get a working version I\\\'ll post it for other PPPoE users and send a copy to the guy that ported it.
Any help would be appreciated,
This is what I\\\'ve got so far (this is partially copied from the scripts in the other startup services and a script found on www.ResExellence.com):
#!/bin/sh
. /etc/rc.common
PATH=usr/local/bin:$PATH;export PATH
##
# Start up PPPoE deamon
##
if [ \\\"${PPPoE:=-NO-}\\\" = \\\"-YES-\\\" ]; then
{
ConsoleMessage \\\"Starting PPPoE\\\"
/usr/sbin/adsl-start;
$status = `/usr/sbin/adsl-status`;
($part1, $part2) = split(/--> /,$status);
($ip, $netmask) = split(/ netmask/,$part2);
route add default $ip;
}
fi
The way the port of PPPoE works is that you run the following commands as root:
/usr/sbin/adsl-start
/usr/sbin/adsl-status
After running adsl-status you have to manually add the ip address it returns by running:
route add default yyy.yyy.yyy.yyy where yyy.yyy.yyy.yyy is the ip in the result of adsl-status.
The way I set it up is so that it will only run if you set it to in hostconfig. The script doesn\\\'t run right now and I was hoping that someone could help me get it cleared up. When I get a working version I\\\'ll post it for other PPPoE users and send a copy to the guy that ported it.
Any help would be appreciated,