]> git.ozlabs.org Git - petitboot/blob - utils/pb-exec
utils: Add pb-exec wrapper
[petitboot] / utils / pb-exec
1 #!/bin/sh
2
3 # Run a program specified by Petitboot.
4 $@
5 echo "$0 ran '$@'"
6
7 # Wait for the user to exit back to Petitboot.
8 read -n 1 -r -p "Press ENTER to return to Petitboot or any other key to drop to a shell" key
9
10 if [ "$key" == "" ]; then
11         echo "Returning to Petitboot.."
12         exit 0
13 fi
14
15 printf "\nLaunching shell. Type 'exit' to return\n"
16 /bin/sh