From f096f6ee16a12a678f89d65f5e2c4fe720c633f1 Mon Sep 17 00:00:00 2001 From: tony-sung <97819349+tony-sung@users.noreply.github.com> Date: Tue, 24 Sep 2024 21:38:14 +0800 Subject: [PATCH] Update entrypoint.sh to ensure compatibility with Podman rootless --- entrypoint.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 4918be3..a4302fc 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,10 +3,12 @@ # exit when any command fails set -e -# create a tun device -sudo mkdir -p /dev/net -sudo mknod /dev/net/tun c 10 200 -sudo chmod 600 /dev/net/tun +# create a tun device if not exist to ensure compatibility with Podman +if [ ! -e /dev/net/tun ]; then + sudo mkdir -p /dev/net + sudo mknod /dev/net/tun c 10 200 + sudo chmod 600 /dev/net/tun +fi # start dbus sudo mkdir -p /run/dbus