summaryrefslogtreecommitdiffstats
path: root/utils/pb-exec
blob: bfe13f6b871dbbdab3e7aedbb96f82bfcc25e729 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# Run a program specified by Petitboot.
$@
echo "$0 ran '$@'"

# Wait for the user to exit back to Petitboot.
read -n 1 -r -p "Press ENTER to return to Petitboot or any other key to drop to a shell" key

if [ "$key" == "" ]; then
	echo "Returning to Petitboot.."
	exit 0
fi

printf "\nLaunching shell. Type 'exit' to return\n"
/bin/sh
OpenPOWER on IntegriCloud