diff options
author | Olaf Hering <olaf@aepfle.de> | 2012-10-18 09:35:00 +0100 |
---|---|---|
committer | Olaf Hering <olaf@aepfle.de> | 2012-10-18 09:35:00 +0100 |
commit | 301febc0fe0fe873b2cdac419eb4053b6c5e6019 (patch) | |
tree | 40b8fb2abab472f6798bbffb05a420081c2e4290 /tools/hotplug | |
parent | 87a05a45860d93455e4cf5672c2b8566c090fb44 (diff) | |
download | xen-301febc0fe0fe873b2cdac419eb4053b6c5e6019.tar.gz xen-301febc0fe0fe873b2cdac419eb4053b6c5e6019.tar.bz2 xen-301febc0fe0fe873b2cdac419eb4053b6c5e6019.zip |
hotplug/Linux: remove hotplug support, rely on udev instead
Hotplug has been replaced by udev since several years. Remove the
hotplug related files and install udev unconditionally.
This makes it possible to remove udev from rpm BuildRequires which
reduces the buildtime dependency chain. For openSuSE:Factory it was
done just now:
http://lists.opensuse.org/opensuse-buildservice/2012-10/msg00085.html
The patch by itself will have no practical impact unless someone
attempts to build and run a Xen dom0 on a really old base system. e.g.
circa SLES9/2007 or earlier
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/hotplug')
-rw-r--r-- | tools/hotplug/Linux/Makefile | 34 | ||||
-rw-r--r-- | tools/hotplug/Linux/xen-backend.agent | 39 |
2 files changed, 1 insertions, 72 deletions
diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile index 5401592ae1..84a4cb1935 100644 --- a/tools/hotplug/Linux/Makefile +++ b/tools/hotplug/Linux/Makefile @@ -27,32 +27,9 @@ XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh XEN_SCRIPT_DATA += vtpm-migration.sh vtpm-impl -XEN_HOTPLUG_DIR = $(CONFIG_DIR)/hotplug -XEN_HOTPLUG_SCRIPTS = xen-backend.agent - -UDEVVER = 0 -ifeq ($(shell [ -x /sbin/udevadm ] && echo 1),1) -UDEVVER = $(shell /sbin/udevadm info -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/' ) -endif -ifeq ($(shell [ -x /usr/bin/udevinfo ] && echo 1),1) -UDEVVER = $(shell /usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/' ) -endif - UDEV_RULES_DIR = $(CONFIG_DIR)/udev UDEV_RULES = xen-backend.rules xend.rules -DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),) -DE = $(if $(DESTDIR),$(shell readlink -f $(DESTDIR)),) -ifeq ($(findstring $(DI),$(DE)),$(DI)) -HOTPLUGS=install-hotplug install-udev -else -ifeq ($(shell [ $(UDEVVER) -ge 059 ] && echo 1),1) -HOTPLUGS=install-udev -else -HOTPLUGS=install-hotplug -endif -endif - .PHONY: all all: @@ -60,7 +37,7 @@ all: build: .PHONY: install -install: all install-initd install-scripts $(HOTPLUGS) +install: all install-initd install-scripts install-udev # See docs/misc/distro_mapping.txt for INITD_DIR location .PHONY: install-initd @@ -87,15 +64,6 @@ install-scripts: $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \ done -.PHONY: install-hotplug -install-hotplug: - [ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \ - $(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR) - set -e; for i in $(XEN_HOTPLUG_SCRIPTS); \ - do \ - $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \ - done - .PHONY: install-udev install-udev: [ -d $(DESTDIR)$(UDEV_RULES_DIR) ] || \ diff --git a/tools/hotplug/Linux/xen-backend.agent b/tools/hotplug/Linux/xen-backend.agent deleted file mode 100644 index 5cb536a6a9..0000000000 --- a/tools/hotplug/Linux/xen-backend.agent +++ /dev/null @@ -1,39 +0,0 @@ -#! /bin/bash - -PATH=/etc/xen/scripts:$PATH - -. /etc/xen/scripts/locking.sh - -claim_lock xenbus_hotplug_global - -case "$XENBUS_TYPE" in - tap) - /etc/xen/scripts/blktap "$ACTION" - ;; - vbd) - /etc/xen/scripts/block "$ACTION" - ;; - vtpm) - /etc/xen/scripts/vtpm "$ACTION" - ;; - vif) - [ -n "$script" ] && $script "$ACTION" - ;; - vscsi) - /etc/xen/scripts/vscsi "$ACTION" - ;; -esac - -case "$ACTION" in - add) - ;; - remove) - /etc/xen/scripts/xen-hotplug-cleanup - ;; - online) - ;; - offline) - ;; -esac - -release_lock xenbus_hotplug_global |