From 2466e736a8b51ffa54d1ab2dfb4807bec507fa94 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeff@scentech-medical.com> Date: Sat, 28 Jan 2023 22:33:22 +0200 Subject: [PATCH] Fixed host entrypoint bug, sudo on wrong line --- 30-add-host-ip-entry.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/30-add-host-ip-entry.sh b/30-add-host-ip-entry.sh index b5b462e..206548f 100755 --- a/30-add-host-ip-entry.sh +++ b/30-add-host-ip-entry.sh @@ -2,8 +2,8 @@ if [ "$EUID" -ne 0 ] then HOST_IP=$(sudo /sbin/ip route|awk '/default/ { print $3 }') - echo "$HOST_IP host.docker.internal" >> /etc/hosts + sudo -s "echo '$HOST_IP host.docker.internal' >> /etc/hosts" else HOST_IP=$(/sbin/ip route|awk '/default/ { print $3 }') - sudo -s "echo '$HOST_IP host.docker.internal' >> /etc/hosts" + echo "$HOST_IP host.docker.internal" >> /etc/hosts fi -- GitLab