blob: ef2c55afa756362530333cef82a9529b5ab8adfc [file] [log] [blame]
Samuel Mendoza-Jonasdb6ca352018-11-26 11:47:43 +11001#!bin/sh
2
3reset
4
5echo "Exiting petitboot. Type 'exit' to return."
6echo "You may run 'pb-sos' to gather diagnostic data"
7
8if [[ "$(id -u)" != "0" ]]; then
9 echo "" | sudo -S /bin/true 2&>1 >> /dev/null
10 if [[ $? = 0 ]]; then
11 echo "No password set, elevating shell"
12 sudo -i
13 exit
14 fi
15fi