12345678910111213141516171819 |
- #!/bin/sh
- OS=`uname`
- HERE=`dirname $0`
- . $HERE/vpn.conf
- . $HERE/router.conf
- IP4_ADDRESS=$IP4_PREFIX$(($IP4_BASE + $ROUTER_ID))
- case $OS in
- FreeBSD)
- ifconfig $INTERFACE $IP4_ADDRESS/$IP4_NETLEN
- ;;
- Linux)
- ip link set $INTERFACE up
- ip addr add $IP4_ADDRESS/$IP4_NETLEN dev $INTERFACE
- ;;
- esac
|