1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!bin/sh reset echo "Exiting petitboot. Type 'exit' to return." echo "You may run 'pb-sos' to gather diagnostic data" if [[ "$(id -u)" != "0" ]]; then echo "" | sudo -S /bin/true 2&>1 >> /dev/null if [[ $? = 0 ]]; then echo "No password set, elevating shell" sudo -i sudo -K exit fi export PS1='$ ' else export PS1='# ' fi