[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
processes: elsedefine missing option?
From: |
Hugo Gayosso |
Subject: |
processes: elsedefine missing option? |
Date: |
27 Aug 2002 12:44:44 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
* Environment
cfengine 2.0.0 (checked the current on-line documentation and
does not appear there either)
Red Hat 7.1/7.2
* Configuring and checking for a running daemon (ntpd):
Let's say I want to modify the config file for 'ntpd' and if this file
is modified the 'ntpd' should be restarted, so I have the following:
editfiles:
{ /etc/ntp.conf
LocateLineMatching "server.*"
ReplaceLineWith "server ntp1.my.domain"
LocateLineMatching "fudge.*"
ReplaceLineWith "fudge ntp1.my.domain stratum 10"
DefineClasses "restart_ntpd"
}
shellcommands:
restart_ntpd::
"$(RH_init_path)/ntpd restart"
I also want to check if 'ntpd' is running, and if it is not, then
'cfengine' should restart it, so I add this:
processes:
"ntpd"
restart "$(RH_init_path)/ntpd restart"
Now if you are still awake you will notice that the line used to
restart 'ntpd' in 'shellcommands' and in 'processes' is the same, in
order to have only one place to define that line would it be possible
to have:
processes:
"ntpd"
elsedefine=restart_ntpd
???
I tried but it didn't work, even though when running 'cfagent --debug'
it says:
ntpd
Restart = (useshell=y)
matches: -1
signal=NOSIG
action=d
ChDir=, ChRoot=
Define
ElseDefine restart_ntpd
[....]
DoSignals(ntpd)
Defining classes
DoSignals(elogd)
Greetings,
- --
Hugo Gayosso
Support the Free Software Movement!
GNU Project <http://www.gnu.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9a6x8x2JZtTN6co8RAhZdAJ9LXPxKeQBW68fqNj8Aja5kasbuWgCfVlam
8r/9L1B1HqKbNfU08dTlYxk=
=L/p3
-----END PGP SIGNATURE-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- processes: elsedefine missing option?,
Hugo Gayosso <=