[OE-core] [PATCH 1/2] dhcp: move dhcp leases files handling to postinst/postrm

Otavio Salvador otavio at ossystems.com.br
Mon Feb 6 11:21:26 UTC 2012


On Mon, Feb 6, 2012 at 09:13, Phil Blundell <philb at gnu.org> wrote:

> On Mon, 2012-02-06 at 11:03 +0000, Otavio Salvador wrote:
> > +pkg_postrm_dhcp-server() {
> > +    rm -f $D/${localstatedir}/lib/dhcp/dhcpd.leases
> > +    rm -f $D/${localstatedir}/lib/dhcp/dhcpd6.leases
> > +    rmdir $D/${localstatedir}/lib/dhcp
> > +}
> > +
> > +pkg_postrm_dhcp-client() {
> > +    rm -f $D/${localstatedir}/lib/dhcp/dhclient.leases
> > +    rm -f $D/${localstatedir}/lib/dhcp/dhclient6.leases
> > +    rmdir $D/${localstatedir}/lib/dhcp
>
> Are those rmdirs not going to fail if you try to remove one package with
> the other one still installed?
>

I think they will. I'll add an || true on it.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20120206/e012d3a7/attachment-0002.html>


More information about the Openembedded-core mailing list