You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/04/11 02:15:38 UTC

[27/50] [abbrv] git commit: updated refs/heads/internallb to 20beb7a

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/internallb
Commit: 6bec37dc046b107c3de16a403adf0a9d7f0c2e18
Parents: 9fca393
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Wed Apr 10 14:57:56 2013 +0200
Committer: Hugo Trippaers <ht...@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