From: Phil Blundell <philb@gnu.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/2] dhcp: move dhcp leases files handling to postinst/postrm
Date: Mon, 06 Feb 2012 11:27:51 +0000 [thread overview]
Message-ID: <1328527672.14363.3.camel@phil-desktop> (raw)
In-Reply-To: <CAP9ODKrFuJ85mcXS6DAJxagFrgonWv+jTCUUQibx3Ug85BOCVw@mail.gmail.com>
On Mon, 2012-02-06 at 09:21 -0200, Otavio Salvador wrote:
> On Mon, Feb 6, 2012 at 09:13, Phil Blundell <philb@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.
If you do that then you'd also need to redirect stderr to avoid getting
error messages on the console. Might be better to wrap the rmdir calls
in a check to see if the directory is empty.
p.
next prev parent reply other threads:[~2012-02-06 11:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 11:03 [PATCH 0/2] Pending patches from O.S. Systems tree Otavio Salvador
2012-02-06 11:03 ` [PATCH 1/2] dhcp: move dhcp leases files handling to postinst/postrm Otavio Salvador
2012-02-06 11:13 ` Phil Blundell
2012-02-06 11:21 ` Otavio Salvador
2012-02-06 11:27 ` Phil Blundell [this message]
2012-02-06 11:03 ` [PATCH 2/2] udev: stop providing cache support by default Otavio Salvador
-- strict thread matches above, loose matches on Subject: below --
2012-02-06 15:16 [PATCH 0/2 v2] Pending patches from O.S. Systems tree Otavio Salvador
2012-02-06 15:16 ` [PATCH 1/2] dhcp: move dhcp leases files handling to postinst/postrm Otavio Salvador
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1328527672.14363.3.camel@phil-desktop \
--to=philb@gnu.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox