X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;ds=inline;f=utils%2Fpb-exec;fp=utils%2Fpb-exec;h=bfe13f6b871dbbdab3e7aedbb96f82bfcc25e729;hb=606c23f642a4e8a3a238cdbc3cd10d74708cbfad;hp=0000000000000000000000000000000000000000;hpb=2914110af0cc490566446f18c929452368121b98;p=petitboot diff --git a/utils/pb-exec b/utils/pb-exec new file mode 100755 index 0000000..bfe13f6 --- /dev/null +++ b/utils/pb-exec @@ -0,0 +1,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