add up and down .sh

This commit is contained in:
Vishvananda Ishaya 2011-04-12 20:33:33 +00:00
parent 3aae677e5a
commit 0c7b62428b
3 changed files with 26 additions and 0 deletions

View File

@ -50,6 +50,18 @@ Making a cloudpipe image is relatively easy.
:language: bash
:linenos:
# set up.sh in /etc/openvpn/
.. literalinclude:: up.sh
:language: bash
:linenos:
# set down.sh in /etc/openvpn/
.. literalinclude:: down.sh
:language: bash
:linenos:
# download and run the payload on boot from /etc/rc.local.
.. literalinclude:: rc.local

7
doc/source/down.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
BR=$1
DEV=$2
/usr/sbin/brctl delif $BR $DEV
/sbin/ifconfig $DEV down

7
doc/source/up.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
BR=$1
DEV=$2
MTU=$3
/sbin/ifconfig $DEV mtu $MTU promisc up
/usr/sbin/brctl addif $BR $DEV