This was a known bug (Bug 2348) ... It was fixed by subversion revision 9576. However, it looks like revision 9576 only applied the updates to the debian/branches/opennms-1.6/ tree, not the debian/trunk/ tree in subversion.
Could someone (RangerRick?) merge the changes from debian/branches/opennms-1.6/ to debian/trunk/? -Paul On Mon, Jul 21, 2008 at 02:26:37PM +0000, Alex Bennee wrote: > On Mon, 2008-07-21 at 13:54 +0000, Alex Bennee wrote: > > Hi, > > > > I'm having trouble working out the correct way to fix this. On an > > upgrade to opennms with a new package I've built it fails as JAVA_HOME > > is not set in /etc/default/opennms. > > > > The postinst script should work, although the current logic prefers > > runjava -s over manually hacking the JAVA_HOME: > > > > if [ -x /usr/lib/jvm/java-6-openjdk/bin/java ]; then > > /usr/share/opennms/bin/runjava -q -S > > /usr/lib/jvm/java-6-openjdk/bin/java || : > > (grep -v ^JAVA_HOME /etc/default/opennms ; echo > > 'JAVA_HOME=/usr/lib/jvm/java-6-openjdk') > /etc/default/opennms.new > > mv /etc/default/opennms.new /etc/default/opennms > > > > Ok, I'm obviously missing some subtle bash-ism, because the grep magic > is run but the echo of "JAVA_HOME" only occurs if there is a comment > line: > > [EMAIL PROTECTED]:~# cat /etc/default/opennms > [EMAIL PROTECTED]:~# sh +x ./opennms-common.postinst configure > + [ -x /usr/lib/jvm/java-6-openjdk/bin/java ] > + /usr/share/opennms/bin/runjava -q -S /usr/lib/jvm/java-6-openjdk/bin/java > + grep -v ^JAVA_HOME /etc/default/opennms > + mv /etc/default/opennms.new /etc/default/opennms > + exit 0 > [EMAIL PROTECTED]:~# echo "# hello hello" > /etc/default/opennms > [EMAIL PROTECTED]:~# sh +x ./opennms-common.postinst configure > + [ -x /usr/lib/jvm/java-6-openjdk/bin/java ] > + /usr/share/opennms/bin/runjava -q -S /usr/lib/jvm/java-6-openjdk/bin/java > + grep -v ^JAVA_HOME /etc/default/opennms > + echo JAVA_HOME=/usr/lib/jvm/java-6-openjdk > + mv /etc/default/opennms.new /etc/default/opennms > + exit 0 > [EMAIL PROTECTED]:~# cat /etc/default/opennms > # hello hello > JAVA_HOME=/usr/lib/jvm/java-6-openjdk > [EMAIL PROTECTED]:~# echo "JAVA_HOME=/usr/lib/jvm/java-6-openjdk" > > /etc/default/opennms > [EMAIL PROTECTED]:~# sh +x ./opennms-common.postinst configure > + [ -x /usr/lib/jvm/java-6-openjdk/bin/java ] > + /usr/share/opennms/bin/runjava -q -S /usr/lib/jvm/java-6-openjdk/bin/java > + grep -v ^JAVA_HOME /etc/default/opennms > + mv /etc/default/opennms.new /etc/default/opennms > + exit 0 > [EMAIL PROTECTED]:~# cat /etc/default/opennms > [EMAIL PROTECTED]:~# > > Or is this simply a bug in bash? > > -- > Alex Bennee, Software Engineer > Does the same as the system call of that name. If you don't know what it > does, don't worry about it. -- Larry Wall in the perl man page regarding > chroot(2) > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Please read the OpenNMS Mailing List FAQ: > http://www.opennms.org/index.php/Mailing_List_FAQ > > opennms-devel mailing list > > To *unsubscribe* or change your subscription options, see the bottom of this > page: > https://lists.sourceforge.net/lists/listinfo/opennms-devel > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-devel
