starting a service if a subpackage is installed

Bill Nottingham notting at redhat.com
Fri Dec 5 13:54:22 UTC 2008


Patrice Dumas (pertusus at free.fr) said: 
> 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

Just rely on admin configuration, like is done for every other
service.

Bill




More information about the fedora-devel-list mailing list