No, this is not the best way to do it. The main reason is that your
software will depend on LCFGng.
There is documentation on writing LCFGng objects but I don't think that
it is very good. There is a good presentation somewhere but I can't
remember where it is. I have copied this mail to German an hopefully he
can point us to this.
Here is how it should be done cleanly.
Create a configuration script for your software, this should be driven
by a configuration file. Include the script and an example configuration
file in the rpm. This way anyone not using LCFGng can us the software.
They just need to copy he example configuration file and tailor the values.
LCFG has three important parts. .def file, component script and template
file.
The .def file defines what variables can be used and and gives them a
default value. The component script will run on the client. This
usually takes the values from the xml profile and uses them to create a
configuration file by using the template file. It will then restart the
service if needs be.
Take a look at the lcg-lcfg-env component. This is a very simple
component that create environment variable on the WN.
Laurence
Fabien Wernli wrote:
> Hi,
>
> I successfully managed to create a custom component, using a .def file,
> which simply consists in adding some variables to the profile. These are
> then used by a RPM that is installed by LCFG, and which calls qxprof in
> its %post install scriptlet in order to properly configure itself.
>
> Is this a "clean" way of doing it?
> Maybe I can ask the question differently: is there a documentation on
> adding new custom components?
>
> thanks in advance
>
|