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

Phil Blundell philb at gnu.org
Mon Feb 6 11:13:37 UTC 2012


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?

p.






More information about the Openembedded-core mailing list