blob: 59337ff53039c4179c4539103cca99f40090efe7 [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
Samuel Mendoza-Jonasb99c5012019-02-21 10:29:12 +110011 echo "No password set, running as root. You may set a password in the System Configuration screen."
Samuel Mendoza-Jonasdb6ca352018-11-26 11:47:43 +110012 sudo -i
Samuel Mendoza-Jonas27f85552019-02-18 10:40:29 +110013 sudo -K
Samuel Mendoza-Jonasdb6ca352018-11-26 11:47:43 +110014 exit
15 fi
Samuel Mendoza-Jonas27f85552019-02-18 10:40:29 +110016 export PS1='$ '
17else
18 export PS1='# '
Samuel Mendoza-Jonasdb6ca352018-11-26 11:47:43 +110019fi