[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [libosinfo 1/2] Create udev rules dir before installing rules file



On Thu, Sep 15, 2011 at 06:07:03PM +0300, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>
> 
> ---
>  data/Makefile.am |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/data/Makefile.am b/data/Makefile.am
> index bd712d4..6fa12d4 100644
> --- a/data/Makefile.am
> +++ b/data/Makefile.am
> @@ -16,6 +16,9 @@ BUILT_SOURCES = 95-osinfo.rules
>  # since it can easily fail (e.g if `make install` is run unprivileged) and its
>  # not a big deal if it does.
>  install-data-hook: 95-osinfo.rules
> +	-mkdir $(DESTDIR)/lib
> +	-mkdir $(DESTDIR)/lib/udev
> +	-mkdir $(DESTDIR)/lib/udev/rules.d
>  	-cp 95-osinfo.rules $(DESTDIR)/lib/udev/rules.d/

I would be writing:

  mkdir -p $(DESTDIR)/lib/udev/rules.d
  $(INSTALL) -m 0644 95-osinfo.rules $(DESTDIR)/lib/udev/rules.d/

Also it's almost always a bad idea to use '-' to ignore errors,
particularly so in this case.

In fact I'd probably also define $(rulesdir), but I guess that's not
so important here.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]