#!/bin/sh
-[ $(id -u) = 0 ] || exec sudo $0 $@
. $(dirname $(realpath $0))/functions XXX
NAME="$1"
exit 1
fi
-sudo nsenter -t "$RSPID" -n -m -p -r -w -i -u -C /bin/bash
+nsenter -t "$RSPID" -n -m -p -r -w -i -u -C /bin/bash
if [ $? = 137 ] ; then
echo "######### please 'fg' this again (if stopped)" >&2
stty sane # a killed bash might leave the tty insane and stty
exit 1
fi
-sudo nsenter -t "$RSPID" -n -m -p /bin/bash <<EOF
+nsenter -t "$RSPID" -n -m -p /bin/bash <<EOF
set -e
LIVE=\$(awk '\$1=="$NAME" && \$3=="overlay" {print \$2;}' < /proc/mounts)
[ -d "\$LIVE" ] && mount --bind $SHARE "\$LIVE$SHARE"