summaryrefslogtreecommitdiff
path: root/net.Linux/tuntap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'net.Linux/tuntap.sh')
-rw-r--r--net.Linux/tuntap.sh37
1 files changed, 9 insertions, 28 deletions
diff --git a/net.Linux/tuntap.sh b/net.Linux/tuntap.sh
index d0fa5a8..64b09d7 100644
--- a/net.Linux/tuntap.sh
+++ b/net.Linux/tuntap.sh
@@ -1,38 +1,20 @@
-# Copyright 2007 Roy Marples
+# Copyright 2007-2008 Roy Marples
# All rights reserved
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-
-tuntap_depend() {
+tuntap_depend()
+{
before bridge interface macchanger
}
_config_vars="$_config_vars tunctl"
-_is_tuntap() {
+_is_tuntap()
+{
[ -n "$(export SVCNAME="net.${IFACE}"; service_get_value tuntap)" ]
}
-tuntap_pre_start() {
+tuntap_pre_start()
+{
local tuntap=
eval tuntap=\$tuntap_${IFVAR}
@@ -61,7 +43,8 @@ tuntap_pre_start() {
eend $? && _up && service_set_value tuntap "${tuntap}"
}
-tuntap_post_stop() {
+tuntap_post_stop()
+{
_is_tuntap || return 0
ebegin "Destroying Tun/Tap interface ${IFACE}"
@@ -74,5 +57,3 @@ tuntap_post_stop() {
fi
eend $?
}
-
-# vim: set ts=4 :