<div dir="ltr">Thanks that is helpful ... works like I would hope ..<div>Next step is to get   /etc/motd  ( and others) into this lens for the general public ...  yes ?  </div><div>When we bundle osquery for installation, we simply pull from the augeas repo ..  Then there would be no need to customize anything.</div><div>Let me know if this is possible / simple / useful !!   Thanks.</div><div><br></div><div><br></div><div>I am using this to automate the CIS Distribution Independent Linux requirements ...  they want to look into these files for various legal / illegal strings.</div><div><br></div><div>The full list of files I would like to add for public consumption is</div><div><br></div><div><div>           . incl "/etc/motd"</div><div>           . incl "/etc/issue"</div><div>           . incl "/etc/<a href="http://issue.net">issue.net</a>"</div><div>           . incl "/etc/audit/audit.rules"</div><div>           . incl "/etc/dconf/profile/gdm"</div><div>           . incl "/etc/dconf/db/gdm.d/01-banner-message"</div></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 25, 2018 at 1:29 PM, Raphaël Pinson <span dir="ltr"><<a href="mailto:raphael.pinson@camptocamp.com" target="_blank">raphael.pinson@camptocamp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Michael,</div><div><br></div><div><br></div><div>You can use Simplelines.lns for that.</div><div><br></div><div><br></div><div>Regards,</div><div><br></div><div>Raphaël<br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Jun 25, 2018 at 7:15 PM, Michael Boldi <span dir="ltr"><<a href="mailto:mboldi@uptycs.com" target="_blank">mboldi@uptycs.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div>I was hoping to find a lens for a generic file like   /etc/motd  ..</div><div>I need to look for certain illegal strings as well as verify some strings exist.</div><div><br></div><div>I would imagine the key is line# and value would be the entire line ..</div><div>I guess the lack of keys in the motd may prohibit this ?</div><div><br></div><div>I wrote a simple ( lens creator newbie )   lens to do this ..</div><div>Is this 2request worth submitting ?  Or can we introduce my simple lens into the library ?</div><div> </div><div>Here ..</div><div><br></div><div><div>module Motd =</div><div>  autoload xfm</div><div><br></div><div>let word = /[^# \n\t\/]+/</div><div><br></div><div>let sto_line = store /[^# \t\n].*$/</div><div><br></div><div>let record = [ key word . (Util.del_ws_tab . sto_line)? . Util.eol ]</div><div><br></div><div>let lns = ( Util.empty | Util.comment | record ) *</div><div>let filter = (</div><div>   incl "/etc/motd" .</div><div>   incl "/etc/issue" .</div><div>   incl "/etc/<a href="http://issue.net" target="_blank">issue.net</a>" )</div><div>let xfm = transform lns filter</div></div><div><br></div><div><br></div></div>
<br></div></div>______________________________<wbr>_________________<br>
augeas-devel mailing list<br>
<a href="mailto:augeas-devel@redhat.com" target="_blank">augeas-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/augeas-devel" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/augeas-devel</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_5353077223089397907gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><span style="font-size:small">Raphaël Pinson</span><div style="font-size:small">Infrastructure Developer & Training Leader</div><div><font size="2">+33 458 482 013</font><div style="font-size:small"><br></div><div style="font-size:small">Camptocamp France SAS</div><div><div><font size="2">Bâtiment le Dauphin - 1er étage</font></div></div><div style="font-size:small"><a href="https://maps.google.com/?q=18+rue+du+Lac+Saint+Andr%C3%A9+Savoie&entry=gmail&source=g">18 rue du Lac Saint André</a></div><div style="font-size:small"><a href="https://maps.google.com/?q=18+rue+du+Lac+Saint+Andr%C3%A9+Savoie&entry=gmail&source=g">Savoie</a> Technolac</div><div style="font-size:small">F-73370 Le Bourget du Lac</div><div style="font-size:small"><br></div><div style="font-size:small"><a href="http://www.camptocamp.com/" style="color:rgb(17,85,204)" target="_blank">www.camptocamp.com</a></div></div>
</div></div></div></div></div></div></div></div></div></div>
</font></span></div>
</blockquote></div><br></div>