From 2dd0492b7567cafd73c9fed4ae7587d617b74721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Wed, 3 Aug 2022 15:40:26 +0200 Subject: [PATCH] entrypoint.sh: check for /dev/net/tun --- entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 8ed72a4..16cc7a3 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,6 +6,10 @@ if [ "$#" -lt 1 ]; then fi unikernel=$1 shift +test -c /dev/net/tun || { + echo Cannot access /dev/net/tun >&2 + exit 2 +} ip=$(ip a show eth0 | awk '/inet/{print $2}') || { echo Could not determine ip address >&2 exit 2