Re: Packaging scm-manager

[email protected] Fri, 9 Aug 2013 02:58:16 +0200
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
Hi Taahir,

iirc init scripts should read the given values from /etc/conf.d folder,
but it's definitly possible to access parts of the real filesystem. you
only have to take care to not exceed the root filesystem (at least it
lead to some failure in an init script i've written).
i'm not sure if this is the best idea, but placing a copy of the
JAVA_HOME value should work quiet well. to achieve this i see two ways:
1) setting the value within the depend part
2) append the update to the shutdown of this script

as i'm not sure when the depend is called this may lead to some errors,
if the things change. in both cases you have to take care, that the
necessary config values have be never written at all (hope there is a
feasible value). imo this should be a much cleaner way.
> BASEDIR=/home/scm-user/scm-server
> REPO="$BASEDIR"/lib
should definitely be placed within the config part to allow changes to it
without the need to modify the init script.

greets
martin


On Thu, Aug 08, 2013 at 06:48:24PM -0500, Taahir Ahmed wrote:
> I'm starting by writing an init script for my existing install (attached).  
> I've got it mostly working, I think, but I am wondering if there's a gentoo-
> approved way of setting a proper value for JAVA_HOME in the init script.
> 
> There is a file (/etc/profile.d/java-config-2.sh) that sets a value for 
> several java-related environment variables.  Is it good practice to source 
> this file from an init script?  Right now I'm just using a sub-shell call to 
> java-config to detect the active system vm.