[
https://issues.apache.org/jira/browse/CLOUDSTACK-9462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15436712#comment-15436712
]
ASF GitHub Bot commented on CLOUDSTACK-9462:
--------------------------------------------
Github user rhtyd commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1647#discussion_r76227828
--- Diff: debian/cloudstack-agent.postinst ---
@@ -41,6 +41,12 @@ case "$1" in
mkdir /etc/libvirt/hooks
fi
cp -a /usr/share/cloudstack-agent/lib/libvirtqemuhook
/etc/libvirt/hooks/qemu
+
+ # Update JAVA_HOME in /etc/default/cloudstack-agent to default JRE
+ JAVA_HOME=$(readlink -f /usr/bin/java | sed 's/\/jre.*java//g')
+ if [ -d "$JAVA_HOME" ]; then
+ sed -i "s:^JAVA_HOME=.*:JAVA_HOME=${JAVA_HOME}:"
/etc/default/cloudstack-agent
+ fi
--- End diff --
@vincentbernat thanks, it makes sense. I'll see if we can move this to the
`default/files`. An alternative is to document this, we can keep some default
path and in our installation/upgrade documentation suggest the admin to fix the
JAVA_HOME here if it's something non-default. The code I've used here simply
replaces JAVA_HOME to whatever is set globally on that host.
> Systemd packaging for Ubuntu 16.04
> ----------------------------------
>
> Key: CLOUDSTACK-9462
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9462
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Rohit Yadav
> Assignee: Rohit Yadav
> Fix For: 4.10.0, 4.9.1
>
>
> Support for building deb packages that will work on Ubuntu 16.04
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)