sön 2018-08-26 klockan 23:05 +0100 skrev Tina Friedrich:
> It depends a little bit on what you really want, I guess? If this is
> really
> just about setting a class case 'apt-listbugs' isn't ASCII, I'd use
> 'returnszero' - something like
>
> classes:
> ascii => returnszero("/usr/bin/file /etc/apt/listbugs/ignore_bugs |
> /bin/grep
> -q ASCII","useshell");
>
> If I want a list of files that aren't ASCII, I'd probably go for a
> module, as
> well.
>
> However, I'd actually be tempted to simply run 'iconv' or 'uni2ascii'
> over it
> from time to time - probably not every CFEngine run (depending how
> often you
> run the agent)? Sort of thinking that you'd be calling to file to
> determine
> whether it's okay, and then probably to iconv/uni2ascii or so anyway,
> might as
> well not bother with the call to 'file'...
iconv is good enough i think.
The reason is that the apt_get package module hardcodes LC_ALL to 'C'
which give ruby in apt-listbugs the fits
if something inside an comment in apt/listbugs/ignore_bugs isn't ASCII
(and i seems to like to drop non-ascii characters inside that file.)
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
help-cfengin...@googlegroups.com.
To post to this group, send email to
help-c...@googlegroups.com.
Visit this group at
https://groups.google.com/group/help-cfengine.
For more options, visit
https://groups.google.com/d/optout.