[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rc.d links in SuSE
From: |
Alexander Mattausch |
Subject: |
Re: rc.d links in SuSE |
Date: |
Fri, 29 Aug 2003 11:08:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030624 |
Hello,
Chip Seraphine schrieb:
We're starting to dabble in SuSE around here, and I am finding that it
is a little trick to get cfengine and the SuSE implementation of
chkconfig to play nicely together.
I am trying to add a "cfsengine" service that runs last and kicks off
a cfagent run and ensures cfservd started up. Normally, I just have
the links: section do something like this:
/etc/rc.d/rc0.d/K00cfengine -> ../init.d/cfengine
/etc/rc.d/rc1.d/K00cfengine -> ../init.d/cfengine
/etc/rc.d/rc2.d/K00cfengine -> ../init.d/cfengine
/etc/rc.d/rc3.d/S99cfengine -> ../init.d/cfengine
/etc/rc.d/rc5.d/S99cfengine -> ../init.d/cfengine
Not so easy in SuSE. I can't specify my preferred 'run numbers' in
the Required-Start and Required-Stop fileds, as insserv complains that
that is not SuSE-like behavior (they insist that you use their
differential-linking mechanism). This means I cannot predict what
number will be assigned to the cfengine service. And if I just treat
it like any other system and set the links myself, the next time
somebody runs chkconfig it will add a second set of links.
(This seems SuSE-specific. Other UnitedLinux implementations support
Required-Start/Stop, and RedHat doesn't do differential linking at all
and just leaves your symlinks alone.)
Using insserv you cannout chose your run numbers. The Required-Start and
Required-Stop fields in the init-script list the services that this
daemon depends on. For example if you want your init script to run after
the network is up, remote filesystems are mounted and syslog is running,
you just say
# Required-Start: $network $syslog $remote_fs
With
# Required-Start: $network $syslog $remote_fs sendmail
you also require sendmail to be started before your script.
We have a SuSE-compliant init-script running, I can send it to you if
you like.
I also tried having the links section define a class if the links did
not exist, and then just running chkconfig. Also no dice-- I can't
get any 'action' types work that don't do anything (all I want to do
is set a class; is the actions field in links: well documented
somewhere?), and even if I could it wouldn't matter since I can't put
a glob expression in the link path (which makes sense if all action
types actually set links, of course).
Short of putting in a horrible hack (like having the start script
accomodate being called twice during startup), does anybody know of a
good solution to this?
With proper Required-Start entries it is quite straightforward. You only
lose the ability to give your own numbers.
Alex