Create TUN device dynamicly

This commit is contained in:
Kroese
2023-04-03 21:24:03 +02:00
parent 7929def7b5
commit ffc8adc89d
4 changed files with 11 additions and 4 deletions

View File

@@ -1,6 +1,14 @@
#!/usr/bin/env bash
set -eu
if [ ! -e /dev/net/tun ]; then
mkdir -p /dev/net
mknod /dev/net/tun c 10 200
chmod 600 /dev/net/tun
fi
[ ! -e /dev/net/tun ] && echo "Error: TUN network interface not available..." && exit 85
: ${INFO:='N'}