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

Re: [Xen-devel] [PATCH 08/13] tools/hotplug: use XEN_SCRIPT_DIR instead of hardcoded path



On Mon, 2014-07-28 at 11:05 +0200, Olaf Hering wrote:
> Helper scripts get installed into XEN_SCRIPT_DIR, but initscripts,
> helper scripts and udev rules still refer to the hardcoded location
> /etc/xen/scripts/. Update scripts, rules and Makefile to refer to
> @@XEN_SCRIPT_DIR@@ instead.
> 
> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
> ---
>  .gitignore                                         |  8 +++++
>  tools/hotplug/Linux/Makefile                       | 40 
> +++++++++++++++++++---
>  .../Linux/init.d/{xen-watchdog => xen-watchdog.in} |  2 +-
>  .../Linux/init.d/{xencommons => xencommons.in}     |  2 +-
>  .../Linux/init.d/{xendomains => xendomains.in}     |  2 +-
>  tools/hotplug/Linux/{vif-setup => vif-setup.in}    |  2 +-
>  .../{xen-backend.rules => xen-backend.rules.in}    | 16 ++++-----
>  ...-hotplug-common.sh => xen-hotplug-common.sh.in} |  2 +-
>  tools/hotplug/Linux/{xendomains => xendomains.in}  |  2 +-
>  9 files changed, 57 insertions(+), 19 deletions(-)
>  rename tools/hotplug/Linux/init.d/{xen-watchdog => xen-watchdog.in} (97%)
>  rename tools/hotplug/Linux/init.d/{xencommons => xencommons.in} (99%)
>  rename tools/hotplug/Linux/init.d/{xendomains => xendomains.in} (97%)
>  rename tools/hotplug/Linux/{vif-setup => vif-setup.in} (60%)
>  rename tools/hotplug/Linux/{xen-backend.rules => xen-backend.rules.in} (60%)
>  rename tools/hotplug/Linux/{xen-hotplug-common.sh => 
> xen-hotplug-common.sh.in} (98%)
>  rename tools/hotplug/Linux/{xendomains => xendomains.in} (99%)
> 
> diff --git a/.gitignore b/.gitignore
> index 685df89..cf2febe 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -159,6 +159,14 @@ tools/flask/utils/flask-set-bool
>  tools/flask/utils/flask-label-pci
>  tools/fs-back/fs-backend
>  tools/hotplug/common/hotplugpath.sh
> +tools/hotplug/Linux/init.d/xen-watchdog
> +tools/hotplug/Linux/init.d/xencommons
> +tools/hotplug/Linux/init.d/xendomains
> +tools/hotplug/Linux/vif-setup
> +tools/hotplug/Linux/xen-backend.rules
> +tools/hotplug/Linux/xen-hotplug-common.sh
> +tools/hotplug/Linux/xendomains
> +tools/hotplug/Linux/_used_path.sh
>  tools/include/xen/*
>  tools/include/xen-foreign/*.(c|h|size)
>  tools/include/xen-foreign/checker
> diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
> index d5de9e6..fb9f1e6 100644
> --- a/tools/hotplug/Linux/Makefile
> +++ b/tools/hotplug/Linux/Makefile
> @@ -32,18 +32,47 @@ XEN_SCRIPT_DATA += block-common.sh
>  UDEV_RULES_DIR = $(CONFIG_DIR)/udev
>  UDEV_RULES = xen-backend.rules $(UDEV_RULES-y)
>  
> +USED_PATH = "_used_path.sh"
> +genpath-target = $(call buildmakevars2file,$(USED_PATH))
> +$(eval $(genpath-target))

I can't see where _used_path.sh is consumed.

> +%: %.in
> +     set -e; \
> +             rm -f $@.new ; \
> +             sed 's|@@XEN_SCRIPT_DIR@@|$(XEN_SCRIPT_DIR)|g' $< >$@.new ; \
> +             $(call move-if-changed,$@.new,$@)

Can you make these substitutions directly from tools/configure.ac? I
think Luis did something similar for the systemd stuff?

If not then you should remove all the "; \" bits and treat this as three
consecutive things in the normal way (the set -e becomes redundant
then).



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.