[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

starting a service if a subpackage is installed



Hello,

I'd like to have a way to start fcron automatically, but only if a
subpackage is installed. I have (locally) implemented the following:

The initscripts are started automatically, but they do:

 [ -e /etc/sysconfig/fcron ] && . /etc/sysconfig/fcron
 case "$1" in
  start)
        if [ "z$FCROND_STARTUP" = 'z' ]; then
           exit 6
        fi

So if $FCROND_STARTUP is not set they won't start. Then I have package
that only contains /etc/sysconfig/fcron, called fcron-startup, with, in
/etc/sysconfig/fcron:

FCROND_STARTUP=1


This seemed like a good idea to me, however when there is no
/etc/sysconfig/fcron, /etc/init.d/fcron start is just silent.

Another possibility would be to put the initscripts in a separate
package and have them started automatically, but I preferred having them
in the main package but switched on and off.


Thoughts?

--
Pat


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]