1
0
mirror of https://github.com/rancher/os.git synced 2025-08-01 23:17:50 +00:00

print message if rancheros-install needs privilege escalation

This commit is contained in:
wlan0 2015-04-29 04:10:53 -07:00
parent 47f7ac22db
commit bfb0df8c37

View File

@ -23,6 +23,11 @@ EOF
PARTITION_FLAG="false"
INSTALL_CONTAINER_IMAGE="rancher/os"
if [ "$(whoami)" != "root" ]; then
echo "Please run as root." 1>&2
exit 1
fi
if [ -x /usr/bin/rancherctl ]; then
INSTALL_CONTAINER_IMAGE="$(rancherctl config get upgrade.image)"
fi
@ -46,11 +51,6 @@ do
esac
done
if [ "$(whoami)" != "root" ]; then
echo "Please run as root." 1>&2
exit 1
fi
if [[ -z "${INSTALL_TYPE}" ]]; then
echo "No install type specified...defaulting to generic"
INSTALL_TYPE="generic"