X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=sbin%2Fgrml-addtun;h=256de5a7c3f2d2b85276584f8cc7689ad2182624;hb=0eb322282725432036fba38f398047ebebf7cc87;hp=ac7d6a4d9754627b0370779354d38b811e7cb0b9;hpb=c66ac69832b67c8b6f5a0eda4f2f4773e46796c8;p=grml-network.git diff --git a/sbin/grml-addtun b/sbin/grml-addtun index ac7d6a4..256de5a 100755 --- a/sbin/grml-addtun +++ b/sbin/grml-addtun @@ -25,13 +25,13 @@ Usage: "$PN_" [OPTIONS] ... $PN_ creates persistent tun/tap devices with bridge handling OPTIONS: - -d delete the given tun devices and remove them from the bridge if given - -u this user should be able to use the tun device - -g this group should be able to use the tun device - -b if given, all tun/tap devices are added/removed from the bridge - -a enable auto mode, eg. create the bridge if not allready existing and - delete it when empty after removing given tun devices - -h this help + -d delete the tun devices and remove them from the bridge if given + -u this user should be able to use the tun device + -g this group should be able to use the tun device + -b if given, all tun/tap devices are added/removed from the bridge + -a enable auto mode, eg. create the bridge if not already existing and + delete it when empty after removing given tun devices + -h this help EOT } @@ -58,10 +58,12 @@ function createTun() if [[ $OPT_BRIDGE_ != '' ]]; then brctl addif "$OPT_BRIDGE_" "$1" fi + ifconfig "$1" 0.0.0.0 up } function trashTun() { + ifconfig "$1" down if [[ $OPT_BRIDGE_ != '' ]]; then brctl delif "$OPT_BRIDGE_" "$1" fi @@ -108,4 +110,4 @@ else fi fi -# vim: filetype=sh +## END OF FILE #################################################################