[pve-devel] [PATCH manager 5/6] cleanup: add network-hooks directory and move respective files
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Jun 20 12:47:02 CEST 2018
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
Makefile | 11 ++---------
network-hooks/Makefile | 13 +++++++++++++
bridgevlan => network-hooks/bridgevlan | 0
bridgevlanport => network-hooks/bridgevlanport | 0
mtu => network-hooks/mtu | 0
vlan => network-hooks/vlan | 0
vlan-down => network-hooks/vlan-down | 0
7 files changed, 15 insertions(+), 9 deletions(-)
create mode 100644 network-hooks/Makefile
rename bridgevlan => network-hooks/bridgevlan (100%)
rename bridgevlanport => network-hooks/bridgevlanport (100%)
rename mtu => network-hooks/mtu (100%)
rename vlan => network-hooks/vlan (100%)
rename vlan-down => network-hooks/vlan-down (100%)
diff --git a/Makefile b/Makefile
index dbf810a0..f44e1a50 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
DESTDIR=
-SUBDIRS = aplinfo PVE bin www services configs
+SUBDIRS = aplinfo PVE bin www services configs network-hooks
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell git rev-parse HEAD)
@@ -38,7 +38,7 @@ upload: ${DEB} check
tar cf - ${DEB} | ssh -X repoman at repo.proxmox.com upload --product pve --dist stretch
.PHONY: install
-install: vzdump-hook-script.pl mtu bridgevlan bridgevlanport vlan vlan-down
+install: vzdump-hook-script.pl
install -d -m 0700 -o www-data -g www-data ${DESTDIR}/var/log/pveproxy
install -d ${DESTDIR}/usr/share/${PACKAGE}
install -d ${DESTDIR}/usr/share/man/man1
@@ -48,15 +48,8 @@ install: vzdump-hook-script.pl mtu bridgevlan bridgevlanport vlan vlan-down
install -d ${DESTDIR}/var/lib/vz/template/cache
install -d ${DESTDIR}/var/lib/vz/template/iso
install -d ${DESTDIR}/var/lib/vz/template/qemu
- install -D -m 0755 mtu ${DESTDIR}/etc/network/if-up.d/mtu
- install -D -m 0755 bridgevlan ${DESTDIR}/etc/network/if-up.d/bridgevlan
- install -D -m 0755 bridgevlanport ${DESTDIR}/etc/network/if-up.d/bridgevlanport
- install -D -m 0755 vlan ${DESTDIR}/etc/network/if-pre-up.d/vlan
- install -D -m 0755 vlan-down ${DESTDIR}/etc/network/if-post-down.d/vlan
-
install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl
install -m 0644 spice-example-sh ${DOCDIR}/examples/spice-example-sh
-
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
.PHONY: distclean
diff --git a/network-hooks/Makefile b/network-hooks/Makefile
new file mode 100644
index 00000000..b6a06dd9
--- /dev/null
+++ b/network-hooks/Makefile
@@ -0,0 +1,13 @@
+include ../defines.mk
+
+all:
+
+.PHONY: install
+install: mtu bridgevlan bridgevlanport vlan vlan-down
+ install -D -m 0755 mtu ${DESTDIR}/etc/network/if-up.d/mtu
+ install -D -m 0755 bridgevlan ${DESTDIR}/etc/network/if-up.d/bridgevlan
+ install -D -m 0755 bridgevlanport ${DESTDIR}/etc/network/if-up.d/bridgevlanport
+ install -D -m 0755 vlan ${DESTDIR}/etc/network/if-pre-up.d/vlan
+ install -D -m 0755 vlan-down ${DESTDIR}/etc/network/if-post-down.d/vlan
+
+clean:
diff --git a/bridgevlan b/network-hooks/bridgevlan
similarity index 100%
rename from bridgevlan
rename to network-hooks/bridgevlan
diff --git a/bridgevlanport b/network-hooks/bridgevlanport
similarity index 100%
rename from bridgevlanport
rename to network-hooks/bridgevlanport
diff --git a/mtu b/network-hooks/mtu
similarity index 100%
rename from mtu
rename to network-hooks/mtu
diff --git a/vlan b/network-hooks/vlan
similarity index 100%
rename from vlan
rename to network-hooks/vlan
diff --git a/vlan-down b/network-hooks/vlan-down
similarity index 100%
rename from vlan-down
rename to network-hooks/vlan-down
--
2.17.1
More information about the pve-devel
mailing list