You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2013/01/09 14:26:47 UTC

[37/50] [abbrv] git commit: init: Explicitly set the HOME variable to the homedir of the user cloud

init: Explicitly set the HOME variable to the homedir of the user cloud

We have to explicitly set the HOME variable to the homedir from the user "cloud"

This is because various scripts run by the management server read the HOME variable
and fail when this init script is run manually.

For example the injectkeys.sh script reads the HOME variable


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

Branch: refs/heads/javelin
Commit: ef89793c4e0265af0c4cc53feddc63544253b1d6
Parents: b18c03a
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Wed Jan 9 13:11:21 2013 +0100
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Wed Jan 9 13:11:21 2013 +0100

----------------------------------------------------------------------
 .../ubuntu/SYSCONFDIR/init.d/cloud-management.in   |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ef89793c/client/distro/ubuntu/SYSCONFDIR/init.d/cloud-management.in
----------------------------------------------------------------------
diff --git a/client/distro/ubuntu/SYSCONFDIR/init.d/cloud-management.in b/client/distro/ubuntu/SYSCONFDIR/init.d/cloud-management.in
index 5ed86c2..4afa707 100755
--- a/client/distro/ubuntu/SYSCONFDIR/init.d/cloud-management.in
+++ b/client/distro/ubuntu/SYSCONFDIR/init.d/cloud-management.in
@@ -38,6 +38,11 @@ CATALINA_HOME=@MSENVIRON@
 DEFAULT=@MSCONF@/tomcat6.conf
 JVM_TMP=/tmp/$NAME-temp
 
+# We have to explicitly set the HOME variable to the homedir from the user "cloud"
+# This is because various scripts run by the management server read the HOME variable
+# and fail when this init script is run manually.
+HOME=$(echo ~cloud)
+
 if [ `id -u` -ne 0 ]; then
 	echo "You need root privileges to run this script"
 	exit 1