5 # Check if root required
6 if [[ "$(id -u)" != "0" ]]; then
7 read -n 1 -r -p "Running as user $(id -un), run as root? (y/N)" key
8 if [ "$key" == "y" ]; then
14 # Run a program specified by Petitboot.
18 # Wait for the user to exit back to Petitboot.
19 read -n 1 -r -p "Press ENTER to return to Petitboot or any other key to drop to a shell" key
21 if [ "$key" == "" ]; then
22 echo "Returning to Petitboot.."
26 printf "\nLaunching shell. Type 'exit' to return\n"