cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [2/2] git commit: updated refs/heads/master to ec7583e
Date Wed, 10 Apr 2013 14:43:52 GMT
Detect if we are root based on the effective uid instead of the username. Allows sysadmins
to specifiy their own username if they want.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6bec37dc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6bec37dc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6bec37dc

Branch: refs/heads/master
Commit: 6bec37dc046b107c3de16a403adf0a9d7f0c2e18
Parents: 9fca393
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Wed Apr 10 14:57:56 2013 +0200
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Wed Apr 10 16:34:31 2013 +0200

----------------------------------------------------------------------
 scripts/vm/systemvm/injectkeys.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6bec37dc/scripts/vm/systemvm/injectkeys.sh
----------------------------------------------------------------------
diff --git a/scripts/vm/systemvm/injectkeys.sh b/scripts/vm/systemvm/injectkeys.sh
index 49adfb3..c17a3c6 100755
--- a/scripts/vm/systemvm/injectkeys.sh
+++ b/scripts/vm/systemvm/injectkeys.sh
@@ -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


Mime
View raw message