Skip to content

Commit 2cca181

Browse files
zelahithaJeztah
authored andcommitted
Check if tun device is avaliable for installation
Signed-off-by: zelahi <elahi.zuhayr@gmail.com>
1 parent 1a7e2fb commit 2cca181

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rootless-install.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ checks() {
9999
>&2 echo "Aborting because rootful Docker is running and accessible. Set FORCE_ROOTLESS_INSTALL=1 to ignore."; exit 1
100100
fi
101101

102+
# Check if tun device is avaliable for rootless kit
103+
if [ ! -e /dev/net/tun ] && [ -z "$FORCE_ROOTLESS_INSTALL" ]; then
104+
>&2 echo "Aborting because /dev/net/tun is not avaliable. Set FORCE_ROOTLESS_INSTALL=1 to ignore."; exit 1
105+
fi
106+
102107
# Validate XDG_RUNTIME_DIR
103108
if [ ! -w "$XDG_RUNTIME_DIR" ]; then
104109
if [ -n "$SYSTEMD" ]; then

0 commit comments

Comments
 (0)