<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><br>
> At any rate, the file in /usr/share/factory/etc/nsswitch.conf should<br>
> prolly be kept in sync or removed.<br>
<br>
Not sure I understand that one...<br>
<br></blockquote><div><br></div><div>the directories /usr/share/factory/etc and /usr/share/factory/var  will</div><div>be automatically copied to /etv and /var very early at boot if those </div><div>directories are empty or do not exist.</div><div><br></div><div>the point is to be able to boot a totally empty rootfs except for /usr.</div><div>Apparently this is a common practice in datacenters, allowing to</div><div>have '/' be a tmpfs, /usr being read-only and having a completely</div><div>stateless boot.</div><div><br></div><div>That's actually pretty cool, and I had the idea of enabling this in </div><div>buildroot at some point. </div><div>For me there are two cases that buildroot should handle</div><div><br></div><div>* either empty entirely /usr/share/factory at the end of the boot </div><div>  and disable the feature entirely to save staff</div><div>* or automatically copy /etc and /var to the factory at the end</div><div>  of the boot to make this feature work reliably.</div><div><br></div><div>Anyway, a proper handling of that feature is probably a </div><div>completely different patchset...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> >  2. we already have other packages that may tweak that file, like:<br>
> >     package/nss-mdns/<a href="http://nss-mdns.mk" rel="noreferrer" target="_blank">nss-mdns.mk</a><br>
> >     package/nss-myhostname/<a href="http://nss-myhostname.mk" rel="noreferrer" target="_blank">nss-myhostname.mk</a><br>
> ><br>
> >  3. which brings us to the point that this file should be tweaked as a<br>
> >     target-finalize hook<br>
> <br>
> kinda like this ?:<br>
> <a href="https://github.com/nolange/buildroot/commit/237eebe9c29c3b8ab68d3abead52e1b7b08e1649" rel="noreferrer" target="_blank">https://github.com/nolange/buildroot/commit/237eebe9c29c3b8ab68d3abead52e1b7b08e1649</a><br>
<br>
I still think it should be made to be target-finalize hooks, one for<br>
each option.<br>
<br>
Also, I don;t get why you want to use the one in factory, rather than<br>
tweak the existing /etc/nsswitch.conf that has already been installed,<br>
like the other nss plugins do.<br>
<br>
And then, at the end. copy the one from /etc/nsswitch.conf over to the<br>
one in factory. That last one is a bit more tricky to come up with<br>
correctly, as this must be done after all nss plugins have had a chance<br>
to tweak nsswitch.conf. So I guess we should extend SYSTEMD_ROOTFS_PRE_CMD_HOOKS<br>
with a new hook that copies /etc/nsswitch.conf over to the factory.<br>
<br>
Regards,<br>
Yann E. MORIN.<br>
<br>
> Note that I am missing the line for mymachines, my sed-foo is too weak<br>
> to add that at the correct position.<br>
> <br>
> Norbert<br>
<br>
-- <br>
.-----------------.--------------------.------------------.--------------------.<br>
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |<br>
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |<br>
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |<br>
| <a href="http://ymorin.is-a-geek.org/" rel="noreferrer" target="_blank">http://ymorin.is-a-geek.org/</a> | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |<br>
'------------------------------^-------^------------------^--------------------'<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><table border="0" style="border-collapse:collapse;border-spacing:0px;color:rgb(51,51,51);font-family:Raleway,regular;font-size:14px;padding:20px"><tbody><tr><td style="padding:0px 30px 0px 0px;font-size:13px;color:rgb(255,128,84);text-align:center"><a href="http://www.smile.eu/" style="background-color:transparent;color:rgb(221,72,20)" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/Logo-new.png" alt="SMILE" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"> </a><br><br><p style="margin:0px 0px 10px">20 rue des Jardins<br>92600 Asnières-sur-Seine</p></td><td style="padding:0px 0px 0px 20px;border-left:1px solid rgb(59,127,254);font-size:13px;color:rgb(255,128,84)"><div style="font-size:14px"><b>Jérémy ROSEN</b></div><div style="color:rgb(59,127,254)">Architecte technique<br></div><br><div style="color:rgb(59,127,254)"><span style="white-space:nowrap"><img src="http://ftp.smile.fr/client/Communication/signature/img/mail.png" alt="email" width="12" height="10" style="border: 0px; vertical-align: middle; margin-right: 5px;"> <a href="mailto:jeremy.rosen@smile.fr" style="background-color:transparent;color:rgb(59,127,254)" target="_blank">jeremy.rosen@smile.fr</a> </span><br><span style="white-space:nowrap"><img src="http://ftp.smile.fr/client/Communication/signature/img/phone.png" alt="phone" width="10" height="10" style="border: 0px; vertical-align: middle; margin-right: 5px;"></span>  +33 6 88 25 87 42 <br><span style="white-space:nowrap"><img src="http://ftp.smile.fr/client/Communication/signature/img/web.png" alt="url" width="12" height="12" style="border: 0px; vertical-align: middle; margin-right: 5px;"> <a href="http://www.smile.eu/" style="background-color:transparent;color:rgb(59,127,254)" target="_blank">http://www.smile.eu</a></span></div><br><div><span><a href="https://twitter.com/GroupeSmile" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-twitter.png" alt="Twitter" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span> <span><a href="https://www.facebook.com/smileopensource" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-facebook.png" alt="Facebook" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span> <span><a href="https://www.linkedin.com/company/smile" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-linkedin.png" alt="LinkedIn" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span> <span><a href="https://github.com/Smile-SA" style="background-color:transparent;color:rgb(221,72,20);margin-right:5px" target="_blank"><img src="http://ftp.smile.fr/client/Communication/signature/img/rs-github.png" alt="Github" style="border: 0px; vertical-align: middle; max-width: 100%; height: auto;"></a></span></div></td></tr></tbody></table><br style="color:rgb(51,51,51);font-family:Raleway,regular;font-size:14px"><div style="color:rgb(51,51,51);font-family:Raleway,regular;font-size:14px"><a href="https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature" style="background-color:transparent;color:rgb(221,72,20)" target="_blank"><img src="https://signature.smile.eu/assets/img/bandeaux_signature_mail_yocto.gif.gif" alt="Découvrez l’univers Smile, rendez-vous sur smile.eu" border="0" style="border: 0px; vertical-align: middle;"></a></div></div></div></div></div></div>