All pastes #1996754 Raw Edit

Untitled

public text v1 · immutable
#1996754 ·published 2010-11-20 00:05 UTC
rendered paste body
diff --git a/netif.d/tap b/netif.d/tap
new file mode 100644
index 0000000..4ba2f7a
--- /dev/null
+++ b/netif.d/tap
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+netif_create() {
+	tunctl -b -t $interface
+	if [ -n "$user" ]; then
+		tunctl -u $user -t $interface
+	fi
+	if [ -n "$group" ]; then
+		tunctl -g $group -t $interface
+	fi
+}
+
+netif_destroy() {
+	tunctl -d interface
+}
+
+netif_pre_up() {
+	ip link set $interface promisc on
+	
+}
diff --git a/netif.d/tunnel b/netif.d/tunnel
deleted file mode 100644
index d31a329..0000000
--- a/netif.d/tunnel
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-netif_create() {
-        tunctl -b -u $user -t $interface
-}
-
-netif_destroy() {
-	tunctl -d $interface
-}
-
-netif_pre_up() {
-	ip link set $interface promisc on
-}