1 |
#!/bin/sh |
#!/bin/sh |
2 |
|
|
3 |
# This is a sample script for ip-up |
# This is a sample script for ip-down |
4 |
# this script is called when pengfork setup the inteface |
# this script is called when pengfork delete the interface |
5 |
# |
# |
6 |
# defined variables: |
# defined variables: |
7 |
# IFNAME : the interface name where tunneling is done |
# IFNAME : the interface name where tunneling is done |
|
# ADDRESS : local ip address |
|
|
# NETMASK : netmask for the address |
|
|
# NETWORK : network for the address |
|
|
# BROADCAST : broadcast address |
|
|
# GATEWAY : the default gateway |
|
8 |
|
|
9 |
IFCONFIG=/sbin/ifconfig |
IFCONFIG=/sbin/ifconfig |
10 |
ROUTE=/sbin/route |
ROUTE=/sbin/route |
16 |
fi |
fi |
17 |
|
|
18 |
if [ -x $ROUTE ]; then |
if [ -x $ROUTE ]; then |
19 |
$ROUTE del default gw $GATEWAY |
$ROUTE del default dev $IFNAME |
20 |
else |
else |
21 |
echo "$0: $ROUTE not found" |
echo "$0: $ROUTE not found" |
22 |
fi |
fi |