5d2771c238
- mkinitrd-suse.sh: Bail out with exit 1 if initrd cannot be generated (bnc#886630) * Add: 0120-mkinitrd-suse.sh-Bail-out-with-exit-1-if-initrd-cann.patch - Adjust initramfs-$kernel.img to SUSE default: initrd-$kernel (bnc#882306) * Add: 0121-Adjust-initramfs-kernel.img-to-SUSE-default-initrd-k.patch - btrfs: btrfs-dump-super and btrfs-select-super do not exist (bnc#886883) * Add: 0122-btrfs-btrfs-dump-super-and-btrfs-select-super-do-not.patch - 95zfcp_rules: fix typo in module_setup (bnc#887582) * Add: 0123-95zfcp_rules-fix-typo-in-module_setup.patch - 40network: Update iBFT scanning code to handle IPv6 (bnc#887542) * Add: 0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch - 40network: separate 'mask' and 'prefix' (bnc#887542) * Add: 0125-40network-separate-mask-and-prefix.patch - 01fips: Add drbg module to force loaded modules (bnc#875855) * Add: 0126-01fips-Add-drbg-module-to-force-loaded-modules.patch OBS-URL: https://build.opensuse.org/request/show/241711 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=174
71 lines
2.1 KiB
Diff
71 lines
2.1 KiB
Diff
From 3c4d4b2c9654e418d422b80e052bdf6d9a02a188 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Renninger <trenn@suse.de>
|
|
Date: Tue, 15 Jul 2014 15:53:23 +0200
|
|
Subject: mkinitrd-suse.sh: Bail out with exit 1 if initrd cannot be generated
|
|
|
|
bnc#886630
|
|
|
|
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
---
|
|
mkinitrd-suse.sh | 17 ++++++++++++++++-
|
|
1 file changed, 16 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh
|
|
index bf10a9d..5b32e6c 100755
|
|
--- a/mkinitrd-suse.sh
|
|
+++ b/mkinitrd-suse.sh
|
|
@@ -282,7 +282,8 @@ done
|
|
|
|
[[ $targets && $kernels ]] || default_kernel_images
|
|
if [[ ! $targets || ! $kernels ]];then
|
|
- error "No kernel found in $boot_dir"
|
|
+ error "No kernel found in $boot_dir or bad modules dir in /lib/modules"
|
|
+ exit 1
|
|
fi
|
|
|
|
# We can have several targets/kernels, transform the list to an array
|
|
@@ -303,6 +304,8 @@ fi
|
|
[[ $domu_module_list ]] || domu_module_list="${DOMU_INITRD_MODULES}"
|
|
shopt -s extglob
|
|
|
|
+failed=""
|
|
+
|
|
for ((i=0 ; $i<${#targets[@]} ; i++)); do
|
|
|
|
if [[ $img_vers ]];then
|
|
@@ -331,14 +334,18 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); do
|
|
# expansion magics
|
|
if [ -n "${modules_all}" ];then
|
|
$dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel" &>/dev/null
|
|
+ [ $? -ne 0 ] && failed="$failed $target"
|
|
else
|
|
$dracut_cmd $dracut_args "$target" "$kernel" &>/dev/null
|
|
+ [ $? -ne 0 ] && failed="$failed $target"
|
|
fi
|
|
else
|
|
if [ -n "${modules_all}" ];then
|
|
$dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel"
|
|
+ [ $? -ne 0 ] && failed="$failed $target"
|
|
else
|
|
$dracut_cmd $dracut_args "$target" "$kernel"
|
|
+ [ $? -ne 0 ] && failed="$failed $target"
|
|
fi
|
|
fi
|
|
done
|
|
@@ -348,4 +355,12 @@ if [ "$skip_update_bootloader" ] ; then
|
|
else
|
|
echo "Update bootloader..."
|
|
update-bootloader --refresh
|
|
+ [ $? -ne 0 ] && echo "Updating bootloader failed" && exit 1
|
|
+fi
|
|
+
|
|
+if [ "$failed" != "" ]; then
|
|
+ echo "Generating $failed targets failed"
|
|
+ exit 1
|
|
fi
|
|
+
|
|
+exit 0
|
|
--
|
|
1.8.4.5
|
|
|