mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zfcpdump: Add install script for zfcpdump
Since version 198 (Feb 2013) systemd contains kernel-install, a script managing kernel installs. This script allows execution of drop-in scripts for customization. Add such a drop-in script to s390-tools to handle the installation of zfcpdump kernels. It's main purpose is to manage a link to the latest installed zfcpudump kernel at ZFCPDUMP_IMAGE, where zipl expects to find the image to install for a SCSI dumper. The script supports two installation modes. One recommended by the BootLoaderSpecs [1] to /boot/<machine-id>/<kernel-version> directories and one directly to /boot. In the second case files are renamed during installation to <original-name>-<kernel-version> to guarantee unique names. Because the zfcpdump kernel is so special make the script stand-alone and prevent any other script from being executed (exit 77) when a zfcpdump is installed. Especially avoid functionality like creating an initrd (already provided by s390-tools) or creating a boot entry (the zfcpdump kernel should not be used for any other purpose than dumping). The script requires systemd >= 203. [1] https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/ Signed-off-by: Philipp Rudo <prudo@linux.ibm.com> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
d08bd23c1e
commit
eb0dc13c88
+13
-3
@@ -1,6 +1,7 @@
|
||||
include ../common.mak
|
||||
|
||||
CPIOINIT = $(call echocmd," CPIOINI ",/$@)./cpioinit
|
||||
INSTALL_SCRIPTS = 10-zfcpdump.install
|
||||
|
||||
ifeq (${HAVE_LIBC_STATIC},0)
|
||||
|
||||
@@ -20,7 +21,7 @@ check_dep:
|
||||
"HAVE_LIBC_STATIC=0", \
|
||||
"-static")
|
||||
|
||||
all: check_dep $(ZFCPDUMP_INITRD)
|
||||
all: check_dep $(ZFCPDUMP_INITRD) scripts
|
||||
|
||||
cpioinit: cpioinit.c
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o $@ $^
|
||||
@@ -34,12 +35,21 @@ $(ZFCPDUMP_INITRD): cpioinit zfcpdump_part
|
||||
$(GZIP) -f $@.tmp
|
||||
$(MV) $@.tmp.gz $(ZFCPDUMP_INITRD)
|
||||
|
||||
scripts: $(INSTALL_SCRIPTS)
|
||||
chmod +x $(INSTALL_SCRIPTS)
|
||||
|
||||
install: all
|
||||
$(INSTALL) -m 611 $(ZFCPDUMP_INITRD) $(DESTDIR)$(ZFCPDUMP_DIR)
|
||||
|
||||
%: %.in
|
||||
zfcpdump_image=$(ZFCPDUMP_DIR)/$(ZFCPDUMP_IMAGE); \
|
||||
$(SED) -e "s#@zfcpdump_image@#$$zfcpdump_image#g" \
|
||||
-e "s#@flavor@#$(ZFCPDUMP_FLAVOR)#g" \
|
||||
< $< > $@
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -f *.o *.gz *.tmp *~ zfcpdump_part cpioinit $(ZFCPDUMP_INITRD)
|
||||
rm -f *.o *.gz *.tmp *~ zfcpdump_part cpioinit $(ZFCPDUMP_INITRD) \
|
||||
$(INSTALL_SCRIPTS)
|
||||
|
||||
.PHONY: all clean install check_dep
|
||||
.PHONY: all clean install check_dep scripts
|
||||
|
||||
Reference in New Issue
Block a user