summaryrefslogtreecommitdiffstats
path: root/openpower/package/petitboot/shell_config
blob: ef2c55afa756362530333cef82a9529b5ab8adfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!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
		exit
	fi
fi
OpenPOWER on IntegriCloud