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 $?
|
||||
}
|
||||
|
||||
if [[ `whoami` == cloud* ]]
|
||||
if [[ "$EUID" -ne 0 ]]
|
||||
then
|
||||
SUDO=$SUDO
|
||||
SUDO="sudo "
|
||||
fi
|
||||
|
||||
$SUDO mkdir -p $MOUNTPATH
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user