mirror of
https://github.com/rancher/os.git
synced 2025-08-12 12:02:22 +00:00
print message if rancheros-install needs privilege escalation
This commit is contained in:
parent
47f7ac22db
commit
bfb0df8c37
@ -23,6 +23,11 @@ EOF
|
|||||||
PARTITION_FLAG="false"
|
PARTITION_FLAG="false"
|
||||||
INSTALL_CONTAINER_IMAGE="rancher/os"
|
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
|
if [ -x /usr/bin/rancherctl ]; then
|
||||||
INSTALL_CONTAINER_IMAGE="$(rancherctl config get upgrade.image)"
|
INSTALL_CONTAINER_IMAGE="$(rancherctl config get upgrade.image)"
|
||||||
fi
|
fi
|
||||||
@ -46,11 +51,6 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$(whoami)" != "root" ]; then
|
|
||||||
echo "Please run as root." 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "${INSTALL_TYPE}" ]]; then
|
if [[ -z "${INSTALL_TYPE}" ]]; then
|
||||||
echo "No install type specified...defaulting to generic"
|
echo "No install type specified...defaulting to generic"
|
||||||
INSTALL_TYPE="generic"
|
INSTALL_TYPE="generic"
|
||||||
|
Loading…
Reference in New Issue
Block a user