You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
295 B

1 year ago
#!/bin/sh
set -x
X="$(pgrep -f ".reaper $1")"
grep -q "^proc " /proc/$X/mounts || \
sudo nsenter -t "$X" -m -p -r -w mount -t proc proc /proc
ROOT="$(sudo nsenter -t "$X" -m -p -r -w mount | \
awk -v S="$1" '$1==S{print $3;exit;}')"
sudo nsenter -t "$X" -n -m -p -r -w -u -C /bin/bash