#
# 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
config CABLES ""
config START "networking ssh"
config SUBSHELL /bin/sh
-config STOP ""
# Setup virtual cabling and subhost's /etc/network/interfaces
setup_veth_cables $NAME $CABLES
cat <<EOF | $CMD
set -x
mount -t proc proc /proc
+mount -t devpts devpts /dev/pts
+mount -t sysfs sysfs /sys
for srv in $START ; do service \$srv start ; done
exec /.reaper $NAME
EOF