aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydractl/dist-upgrade6
1 files changed, 6 insertions, 0 deletions
diff --git a/share/hydractl/dist-upgrade b/share/hydractl/dist-upgrade
index 9ba4892..85f93cb 100755
--- a/share/hydractl/dist-upgrade
+++ b/share/hydractl/dist-upgrade
@@ -171,6 +171,12 @@ function hydra_system_upgrade_cleanup {
apt-get clean
}
+# Check for root user
+if [ "`whoami`" != "root" ]; then
+ echo "please run this command as root"
+ exit 1
+fi
+
# Initialize
if [ ! -e "$STATE" ]; then
hydra_system_upgrade_env