diff options
Diffstat (limited to 'openpower/package/petitboot/shell_config')
-rw-r--r-- | openpower/package/petitboot/shell_config | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/openpower/package/petitboot/shell_config b/openpower/package/petitboot/shell_config new file mode 100644 index 00000000..ef2c55af --- /dev/null +++ b/openpower/package/petitboot/shell_config @@ -0,0 +1,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 |