about summary refs log tree commit diff stats
path: root/tools/conf/etc/rc.d/blan
diff options
context:
space:
mode:
authorpunk <punk@libernaut>2021-04-29 16:11:04 +0100
committerpunk <punk@libernaut>2021-04-29 16:11:25 +0100
commit9bef2e2b7ea351b6b1cb490597356677db61ff34 (patch)
treec36ae24aa3c36f6c19284c7d4da7c25a620bfabf /tools/conf/etc/rc.d/blan
parent6b5cf63d1987889e272643bf7eeb7725df856d11 (diff)
parent5e601f7ee14830ef645ee3d3b1bcdce7450a5ce3 (diff)
downloaddoc-master.tar.gz
release 0.7.2 HEAD master
Diffstat (limited to 'tools/conf/etc/rc.d/blan')
-rwxr-xr-xtools/conf/etc/rc.d/blan71
1 files changed, 0 insertions, 71 deletions
diff --git a/tools/conf/etc/rc.d/blan b/tools/conf/etc/rc.d/blan
deleted file mode 100755
index 61ac2d6..0000000
--- a/tools/conf/etc/rc.d/blan
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-#
-# /etc/rc.d/blan: start/stop virtual network interfaces
-#
-
-DEV="br0"
-PHY="enp8s0"
-
-ADDR=10.0.0.254
-#ADDR=10.0.1.254
-MASK=8
-#GW=10.0.0.1
-GW=192.168.1.254
-
-# one tap for each cpu core
-NTAPS=$((`/usr/bin/nproc`))
-
-case $1 in
-    start)
-        /sbin/ip link add name ${DEV} type bridge
-        /sbin/ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast +
-        /sbin/ip link set dev ${DEV} up
-        /bin/sleep 0.2s
-
-        # Add network to virtual bridge
-        /sbin/ip link set dev ${PHY} down
-        /bin/sleep 0.1s
-        /sbin/ip route flush dev ${PHY}
-        /sbin/ip addr flush dev ${PHY}
-        /sbin/ip link set dev ${PHY} up
-        /bin/sleep 0.2s
-
-        /sbin/ip link set dev ${PHY} master ${DEV}
-        /sbin/ip route add default via ${GW}
-
-        for i in `/usr/bin/seq $NTAPS`
-        do
-            TAP="tap$i"
-            echo "Setting up ${TAP} tap interface."
-            /sbin/ip tuntap add ${TAP} mode tap group kvm
-            /sbin/ip link set ${TAP} up
-            /bin/sleep 0.2s
-            /sbin/ip link set ${TAP} master ${DEV}
-        done
-
-        exit 0
-        ;;
-    stop)
-
-        for i in `/usr/bin/seq $NTAPS`
-        do
-            TAP="tap$i"
-            echo "Deleting ${TAP} tap interface."
-            /sbin/ip link del ${TAP}
-        done
-
-        /sbin/ip link set dev ${DEV} down
-        /sbin/ip route flush dev ${DEV}
-        /sbin/ip link del ${DEV}
-        exit 0
-        ;;
-    restart)
-        $0 stop
-        $0 start
-        ;;
-    *)
-        echo "Usage: $0 [start|stop|restart]"
-        ;;
-esac
-
-# End of file