[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need help with cfengine 2.0.2 editfiles/ReplaceAll
From: |
Adrian Phillips |
Subject: |
Re: Need help with cfengine 2.0.2 editfiles/ReplaceAll |
Date: |
04 Oct 2002 08:55:36 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
>>>>> "Paul" == Shoemaker, Paul A <PASHOEMA@southernco.com> writes:
Paul> Hello! I am trying to upgrade from 1.6.3 to 2.0.2 of
Paul> cfengine. But cfagent is doing something that has caught me
Paul> by surprise.
Paul> I've got the following coded: editfiles: sparc.!restricted::
Paul> { /etc/shadow Inform "true" ReplaceAll "^root.*" With
Paul> "root:VoMhjHORJ/Ops:11856::::::" }
Paul> This has worked fine under cfengine 1.6.3.
Yes. V2 has some extra checks so you don't replace everytime when the
replacement will match the match string. Try :-
ReplaceAll "^root:[^:]:" With "root:password:"
(Hmm, will that give the same error, not sure, if the password is
blank to begin with then ^root:: will work as a match)
Paul> For some reason the warning appears to be reversing the
Paul> search string and the replacement string, and the edit isn't
Paul> being performed at all.
I think the warning was fixed in 2.0.3 or 2.0.4.
Sincerely,
Adrian Phillips
--
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now? [OK]