3 [ $(id -u) = 0 ] || exec sudo $0 $@
4 . $(dirname $(realpath $0))/functions XXX
8 [ -z "$NAME" ] && echo "Select subhost: $(list_running)" && exit 0
10 read USPID RSPID <<EOF
14 [ -z "$USPID" ] && echo "$NAME is not running" >&2 && exit 1
16 if [ -z "$RSPID" ] ; then
18 *** $NAME is started (pid $USPID) but doesn't seem to be running
19 *** /.reaper and might need manual fixing.
24 sudo nsenter -t "$RSPID" -n -m -p -r -w -i -u -C /bin/bash
25 if [ $? = 137 ] ; then
26 echo "######### please 'fg' this again (if stopped)" >&2
27 stty sane # a killed bash might leave the tty insane and stty
28 # typically gets stopped trying to correct it