From be0a62fc3cfee326611b3352b2e8c2cd65f607e1 Mon Sep 17 00:00:00 2001 From: zelahi Date: Mon, 10 Jun 2019 11:48:20 -0700 Subject: [PATCH] Check if tun device is avaliable for installation Signed-off-by: zelahi --- rootless-install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rootless-install.sh b/rootless-install.sh index d37d255c..6cd9569b 100755 --- a/rootless-install.sh +++ b/rootless-install.sh @@ -61,6 +61,11 @@ checks() { >&2 echo "Aborting because rootful Docker is running and accessible. Set FORCE_ROOTLESS_INSTALL=1 to ignore."; exit 1 fi + # Check if tun device is avaliable for rootless kit + if [ ! -e /dev/net/tun ] && [ -z "$FORCE_ROOTLESS_INSTALL" ]; then + >&2 echo "Aborting because /dev/net/tun is not avaliable. Set FORCE_ROOTLESS_INSTALL=1 to ignore."; exit 1 + fi + # Validate XDG_RUNTIME_DIR if [ ! -w "$XDG_RUNTIME_DIR" ]; then if [ -n "$SYSTEMD" ]; then @@ -185,9 +190,9 @@ start_docker() { fi mkdir -p $HOME/.config/systemd/user - + DOCKERD_FLAGS="--experimental" - + if [ -n "$SKIP_IPTABLES" ]; then DOCKERD_FLAGS="$DOCKERD_FLAGS --iptables=false" fi