Gentoo Archives: gentoo-java

From: assabajanischer_hinterwaeldler@×××××.de
To: gentoo-java@l.g.o
Subject: Re: [gentoo-java] Packaging scm-manager
Date: Fri, 09 Aug 2013 00:57:27
Message-Id: 20130809005816.GA5301@me.fritz.box
In Reply to: [gentoo-java] Packaging scm-manager by Taahir Ahmed
1 Hi Taahir,
2
3 iirc init scripts should read the given values from /etc/conf.d folder,
4 but it's definitly possible to access parts of the real filesystem. you
5 only have to take care to not exceed the root filesystem (at least it
6 lead to some failure in an init script i've written).
7 i'm not sure if this is the best idea, but placing a copy of the
8 JAVA_HOME value should work quiet well. to achieve this i see two ways:
9 1) setting the value within the depend part
10 2) append the update to the shutdown of this script
11
12 as i'm not sure when the depend is called this may lead to some errors,
13 if the things change. in both cases you have to take care, that the
14 necessary config values have be never written at all (hope there is a
15 feasible value). imo this should be a much cleaner way.
16 > BASEDIR=/home/scm-user/scm-server
17 > REPO="$BASEDIR"/lib
18 should definitely be placed within the config part to allow changes to it
19 without the need to modify the init script.
20
21 greets
22 martin
23
24
25 On Thu, Aug 08, 2013 at 06:48:24PM -0500, Taahir Ahmed wrote:
26 > I'm starting by writing an init script for my existing install (attached).
27 > I've got it mostly working, I think, but I am wondering if there's a gentoo-
28 > approved way of setting a proper value for JAVA_HOME in the init script.
29 >
30 > There is a file (/etc/profile.d/java-config-2.sh) that sets a value for
31 > several java-related environment variables. Is it good practice to source
32 > this file from an init script? Right now I'm just using a sub-shell call to
33 > java-config to detect the active system vm.