initial commit of bin scripts into git
This commit is contained in:
19
pppon
Executable file
19
pppon
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo /usr/sbin/pppd ttyS0 115200 user ddp bsdcomp 15,15 debug crtscts defaultroute mru 1500 mtu 1500 connect '/usr/sbin/chat -vf /home/ddp/bin/56k-script -r /var/log/chat'
|
||||
cnt=0
|
||||
while [ 1 ]; do
|
||||
/sbin/route -n | grep ppp0
|
||||
if [ $? == 0 ] ; then
|
||||
sudo /sbin/ip route replace default dev 'ppp0'
|
||||
sudo route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0
|
||||
sudo /home/ddp/bin/ip_forwarding.sh 1
|
||||
exit 0
|
||||
fi
|
||||
sleep 1
|
||||
cnt=`expr $cnt + 1`
|
||||
if [ $cnt == 60 ] ; then
|
||||
echo "Failed to have ppp0 up in 60 seconds, exiting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user