mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Detect if we are root based on the effective uid instead of the username. Allows sysadmins to specifiy their own username if they want.
This commit is contained in:
parent
9fca393f01
commit
6bec37dc04
@ -69,9 +69,9 @@ copy_priv_key() {
|
|||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ `whoami` == cloud* ]]
|
if [[ "$EUID" -ne 0 ]]
|
||||||
then
|
then
|
||||||
SUDO=$SUDO
|
SUDO="sudo "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$SUDO mkdir -p $MOUNTPATH
|
$SUDO mkdir -p $MOUNTPATH
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user