[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
editfiles: DefineClasses can't be used in multiple BeginGroupIfNoSuchLin
From: |
Hugo Gayosso |
Subject: |
editfiles: DefineClasses can't be used in multiple BeginGroupIfNoSuchLine |
Date: |
29 May 2002 12:56:13 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
cfengine-2.0.0
Red Hat Linux 7.2
Excerpt from input file:
editfiles:
Mymachine::
{ /etc/swinstall_serial_number
AutoCreate
BeginGroupIfNoSuchLine "1"
AppendIfNoSuchLine "1"
DefineClasses "swinstall_1"
EndGroup
BeginGroupIfNoSuchLine "2"
AppendIfNoSuchLine "2"
DefineClasses "swinstall_2"
EndGroup
}
When cfengine reads this config file, it behaves as expected except
that it only defines "swinstall_1", it never defines "swinstall_2".
I manually verified that the file '/etc/swinstall_serial_number' had
only one line:
$ cat /etc/swinstall_serial_number
1
I also verified that cfengine is entering the correct BeginGroup
entry:
# cfagent --debug
[....]
Begin editing /etc/swinstall_serial_number
(Begin Group - skipping, line exists)
(Begin Group - no line 2)
Appending [2]
(End Group)
End editing /etc/swinstall_serial_number
[....]
But still swinstall_2 is not defined, swinstall_1 is, I know that
because there are a couple of "shellcommands" entries:
shellcommands:
swinstall_1::
"/bin/sh -c 'cd /mnt/software ; /bin/rpm -Uv perl-HTML-Tree
perl-HTML-Tagset perl-HTML-Parser perl-HTML-Format'"
swinstall_2::
"/bin/sh -c 'cd /mnt/software ; /bin/rpm -Uv kernel-headers glibc-devel '"
But only the entry in swinstall_1 gets executed.
P.S.
Any other ideas on how to configure cfengine to install software
"on-demand" would be appreciated.
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
iD8DBQE89Qgtx2JZtTN6co8RAimMAKCNmH9UngLPTv1Y3vY/q3mxeC1IowCgjb3M
Xigdq3uMPPxpPTxoPrfD7D8=
=NghF
-----END PGP SIGNATURE-----
- editfiles: DefineClasses can't be used in multiple BeginGroupIfNoSuchLine,
Hugo Gayosso <=