[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: LocateLineMatching not working correctly
From: |
Patrice GUERLAIS |
Subject: |
RE: LocateLineMatching not working correctly |
Date: |
Fri, 8 Dec 2000 09:50:25 +0100 |
I'm not sure cfengine does 'partial matching', i.e. matches lines containing
the pattern (like Perl does). So you should try with :
LocateLineMatching 'USE_KERNEL_NFSD=.*'
and
LocateLineMatching 'USE_NIS_FOR_AUTOFS=.*'
HIH
Patrice
> -----Message d'origine-----
> De : address@hidden [mailto:address@hidden la
> part de Peter Weilbacher
> Envoye : jeudi 7 decembre 2000 19:52
> A : address@hidden
> Objet : LocateLineMatching not working correctly
>
>
> Hi,
>
> I just tried a script for a SuSE Linux machine which used to be
> working ok with 1.5.4 with 1.6.0.a11 and now 1.6.0, but
> LocateLineMatching does not seem to be working correctly.
>
> I do
>
> editfiles:
>
> { /etc/rc.config
> LocateLineMatching 'USE_KERNEL_NFSD'
> ReplaceLineWith 'USE_KERNEL_NFSD=no'
> LocateLineMatching 'USE_NIS_FOR_AUTOFS'
> ReplaceLineWith 'USE_NIS_FOR_AUTOFS=yes'
> }
>
> in cf.linux and
>
> # grep USE_KERNEL_NFSD /etc/rc.config
> USE_KERNEL_NFSD="no"
>
> gives the expected result. But cfengine -v says
>
> cfengine:host: Begin editing /etc/rc.config
> Edit: Search for USE_KERNEL_NFSD failed. Current line still 1
> cfengine:host: LocateLineMatchingRegexp failed in /etc/rc.config, aborting
> editing
> cfengine:host: End editing /etc/rc.config
>
> I do not see why?! Probably a bug...
>
> Greetings,
> Peter.
>
>
> _______________________________________________
> Bug-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-cfengine