resurrecting forgets POST_REBUILD (files)

Remco Lubbers remco at web-adept.nl
Tue Mar 7 09:40:04 UTC 2006


Citeren sofar <sofar at foo-projects.org>:

> On Mon,  6 Mar 2006 20:05:48 +0100, "Remco Lubbers" <remco at web-adept.nl>
> wrote:

> > Having created a few modules the past few days, using
> > http://wiki.lunar-linux.org/index.php/Module_Basics as Holy Word, I
> > noticed that installing a module through lin, removing it through lrm
> > an reinstalling it by 'lin <module>', which resurrects the removed
> > module if nothing changes (new version, remove sources etc), "forgets"
> > to install the configuration files which are installed by POST_BUILD,
> > although the above mentioned link says <quote>POST_BUILD runs in place
> > of the default_post_build routine which is used to install minor
> > documentation and transfer/enable initialization scripts and similar
> > system data, mostly into /etc</quote>.

> yes, I just fixed that (the wiki - it was wrong). You should NOT use the
> POST_BUILD file - it's only to provide some override capabilities for older
> modules and -profile stuff, really icky

Baaaahhhh!

> > An Example is the linux_logo module I just submitted. In order to get
> > /etc/linux_logo.conf and/or /etc/profile.d/linux_logo.rc back, you'll
> > have to at leat 'lin -c linux_logo', it that expected behaviour?
>
> the profile.d code should be handled by resurrect, if not then file a bug. I
> assume that the module has a 'profile.d' subdir with the xxx.rc in it?

No it doesn't. I did that at first, but the .rc file then gets copied into
/etc/profile.d/ anyhow, which is probably expected behaviour, but I only want
it there if the user wants to run linux_logo every login. of course I could
have the module remove it if the the mquery result = "n", but I found this more
practical and logical.

> installing config files should be done in the BUILD as follows:
>
> (
>
>   default_build &&
>   if [ ! -e /etc/config.file ]; then
>     install config.file /etc/
>   fi
>
> ,,, for all config files. This will enable resurrect AND upgrades to install
> the (updated) configfiles (over the unchanged original).

Right! I'll change the linux_logo module and resubmit it again tonight, please
ignore yesterdays submission.

> anything else that impossibly can't go in BUILD must go into POST_INSTALL.
> Optimally, POST_INSTALL should NEVER install any files. (RFC language here:
> should means 'must')

Noted!

Remco

--
Remco Lubbers
remco at web-adept.nl
+31-6-38608463

Web-Adept internet services & server management
http://www.web-adept.nl/


More information about the Lunar-dev mailing list