From 75ea83f469a312689e98d57203f3e5d5edb37fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Wed, 14 Feb 2024 14:42:13 +0100 Subject: [PATCH] replace the OUTPUT=IPL with equivalent OUTPUT=RAMDISK The initial PR with s390 support in ReaR introduced an s390-only OUTPUT=IPL undocumented option. However, the OUTPUT=IPL option is completely redundant because it does the exact same thing as the already existing and documented OUTPUT=RAMDISK option. This commit removes the whole IPL directory sub-tree and introduces a fallback that replaces OUTPUT=IPL with OUTPUT=RAMDISK during the prep phase with a deprecation warning to still be backwards compatible with existing local.conf files. Related: https://github.com/rear/rear/issues/3149#issuecomment-1941620475 --- usr/share/rear/output/IPL/Linux-s390/800_create_ipl.sh | 5 ----- usr/share/rear/prep/Linux-s390/034_check_config.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 usr/share/rear/output/IPL/Linux-s390/800_create_ipl.sh create mode 100644 usr/share/rear/prep/Linux-s390/034_check_config.sh diff --git a/usr/share/rear/output/IPL/Linux-s390/800_create_ipl.sh b/usr/share/rear/output/IPL/Linux-s390/800_create_ipl.sh deleted file mode 100644 index 54a724da1d..0000000000 --- a/usr/share/rear/output/IPL/Linux-s390/800_create_ipl.sh +++ /dev/null @@ -1,5 +0,0 @@ -# Create the 'initial program' to boot/load the ReaR recovery system -# on IBM Z via IPL (initial program load) -LogPrint "Creating initial program for IPL on IBM Z" -RESULT_FILES+=( $KERNEL_FILE $TMP_DIR/$REAR_INITRD_FILENAME ) - diff --git a/usr/share/rear/prep/Linux-s390/034_check_config.sh b/usr/share/rear/prep/Linux-s390/034_check_config.sh new file mode 100644 index 0000000000..0f3296812e --- /dev/null +++ b/usr/share/rear/prep/Linux-s390/034_check_config.sh @@ -0,0 +1,8 @@ +if [ "$OUTPUT" = "IPL" ]; then + LogPrintError "Warning: OUTPUT=IPL is deprecated. Use OUTPUT=RAMDISK instead." + OUTPUT=RAMDISK +fi + +if [ "$OUTPUT" != "RAMDISK" ] ; then + Error "Currently, only OUTPUT=RAMDISK is supported on s390/s390x" +fi