From: Ralph Ronnquist Date: Mon, 21 Mar 2022 03:52:01 +0000 (+1100) Subject: bring up lo upon adding netns X-Git-Tag: deb_0.1~21 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=30b4abe1164d8b9ed9a944dc57a03ac816e26114;p=rrq%2Foverlay-boot.git bring up lo upon adding netns --- diff --git a/overlay-boot b/overlay-boot index f068b43..d683017 100755 --- a/overlay-boot +++ b/overlay-boot @@ -16,7 +16,10 @@ if [ -z "$UNSHARED" ] ; then # # Create the network namespace for the subhost, then trigger # detached re-run with unshared mount namespace - [ -r /run/netns/$NAME ] || ip netns add $NAME + [ -r /run/netns/$NAME ] || { + ip netns add $NAME + ip netns exec $NAME ip link set lo up + } exec env UNSHARED=yes unshare -m $0 $@ > $LOG 2>&1 & echo "Logging to $LOG" >&2 exit 0