diff --git a/doc/source/devref/cloudpipe.rst b/doc/source/devref/cloudpipe.rst index e12d47dd7b89..95570aa1b34a 100644 --- a/doc/source/devref/cloudpipe.rst +++ b/doc/source/devref/cloudpipe.rst @@ -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 diff --git a/doc/source/down.sh b/doc/source/down.sh new file mode 100644 index 000000000000..5c1888870bf8 --- /dev/null +++ b/doc/source/down.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +BR=$1 +DEV=$2 + +/usr/sbin/brctl delif $BR $DEV +/sbin/ifconfig $DEV down diff --git a/doc/source/up.sh b/doc/source/up.sh new file mode 100644 index 000000000000..073a58e158c4 --- /dev/null +++ b/doc/source/up.sh @@ -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