Skip to content

Commit

Permalink
Check if tun device is avaliable for installation
Browse files Browse the repository at this point in the history
  • Loading branch information
zelahi committed Jun 10, 2019
1 parent 2f4ae48 commit a9b972e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rootless-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a9b972e

Please sign in to comment.