Skip to content

Commit

Permalink
snagrecover: am335x_usb_setup.sh: start recovery shell in current dir
Browse files Browse the repository at this point in the history
Make sure that the recovery shell doesn't change the current directory to
something else.

Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
  • Loading branch information
rgantois committed Jan 5, 2024
1 parent de02fac commit 5f4bbd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/snagrecover/am335x_usb_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ printf "Logging user %s into new shell\n" "$SUDOER"
echo "===== $NETNS_NAME ====="
echo "You can now setup the board and run the recovery tool."
echo "Please type 'exit' to delete the namespace, stop the polling process and leave the shell when you are done."
SUDO_PS1='(am335_recovery) \u@\h:\w \$' ip netns exec "$NETNS_NAME" sudo -i -u "$SUDOER" sh

echo "cd $(pwd); exec </dev/tty" | SUDO_PS1='(am335_recovery) \u@\h:\w \$' ip netns exec "$NETNS_NAME" sudo -i -u "$SUDOER" sh -i

#leave shell and cleanup
cleanup
Expand Down

0 comments on commit 5f4bbd1

Please sign in to comment.