Koozali.org: home of the SME Server

Program on startup

Jaime Nebrera

Program on startup
« on: September 14, 2001, 03:44:49 AM »
Hi all,

  I'm one of the developers of e-smith monitor package. We have done a complete redo of the package so the data gatherer script now runs as a daemon (instead of from cron) besides other improvements.

  We have the packege running perfectly well but it seems e-smith remakes the /etc/init.d/rc7.d directory after a system upgrade so we will loose our simbolic link. How should we do it in a ESGS way?

  BTW, how to make the daemon stop without a core when the system shutdowns?

  Thanks for your help. Once this is solved we will release the new version of the package :))

  Regards.

Michael Doerner

Re: Program on startup
« Reply #1 on: September 14, 2001, 03:20:25 PM »
Jaime,

I am not an expert for that but this was discussed recently on the developer's mailing list as follows. Maybe that helps?

Regards,
Michael Doerner

----------------------------------------

> To have them automatically run at boot up I created symbolic links for
them in the /etc/rc.d/rc7.d/ directory
>
> ln -s /etc/rc.d/init.d/powstatd /etc/rc.d/rc7.d/S100powst
> ln -s /etc/rc.d/init.d/3dmd /etc/rc.d/rc7.d/S253dmd
>
> This works fine until I perform the
> /sbin/e-smith/signal-event post-upgrade
> /sbin/e-smith/signal-event reboot
> command and the links disappear.

The post-upgrade event removes all links from rc7.d, then rebuilds all of
the needed ones, via /etc/e-smith/events/actions/conf-*-startup scripts.

> Why is this and how do I prevent having to redo the links again after
> future upgrades?

You create an e-smith-3dm RPM which contains a conf-3dm-startup script,
which is linked into the post-upgrade and post-install event directories.
See http://www.e-smith.org/docs/howto/building-contribs.php3.