From 650ca2a2ce0a1619fb01bf782515e4d77bbd118231874af8574a452470aefba0 Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Fri, 4 Oct 2013 17:24:02 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=65 --- dracut.changes | 7 +++++++ dracut.spec | 3 +++ implement_default.patch | 2 +- mkinitrd_update_bootloader.diff | 14 ++++++++++++++ quiet_options.patch | 4 ++-- suse_host_only.patch | 2 +- 6 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 mkinitrd_update_bootloader.diff diff --git a/dracut.changes b/dracut.changes index cfdb613..4d2ccea 100644 --- a/dracut.changes +++ b/dracut.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 4 17:23:19 UTC 2013 - tittiatcoke@gmail.com + +- Add patch mkinitrd_update_bootloader.diff so that after + generating the initrd, the update-bootloader is called to update + grub2. + ------------------------------------------------------------------- Fri Oct 4 16:26:20 UTC 2013 - tittiatcoke@gmail.com diff --git a/dracut.spec b/dracut.spec index 6dec870..b70fb30 100644 --- a/dracut.spec +++ b/dracut.spec @@ -64,6 +64,8 @@ Patch11: root_fs.patch Patch12: suse_host_only.patch # PATCH-FIX-OPENSUSE Write caller and used parameters to syslog if mkinitrd is called - trenn@suse.de Patch13: suse_only_logger.patch +# PATCH-FIX-OPENSUSE Call the update-bootloader after dracut finished creating the initrd - tittiatcoke@gmail.com +Patch14: mkinitrd_update_bootloader.diff BuildRequires: bash BuildRequires: dash @@ -151,6 +153,7 @@ This package contains tools to assemble the local initrd and host configuration. %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %build %configure\ diff --git a/implement_default.patch b/implement_default.patch index 611999f..ce944dc 100644 --- a/implement_default.patch +++ b/implement_default.patch @@ -79,7 +79,7 @@ Index: dracut-033/mkinitrd-dracut.sh while (($# > 0)); do case ${1%%=*} in --with-usb) read_arg usbmodule "$@" || shift $? -@@ -119,7 +180,8 @@ while (($# > 0)); do +@@ -124,7 +185,8 @@ while (($# > 0)); do shift done diff --git a/mkinitrd_update_bootloader.diff b/mkinitrd_update_bootloader.diff new file mode 100644 index 0000000..f71719f --- /dev/null +++ b/mkinitrd_update_bootloader.diff @@ -0,0 +1,14 @@ +diff -urNB dracut-033/mkinitrd-dracut.sh new/mkinitrd-dracut.sh +--- dracut-033/mkinitrd-dracut.sh 2013-10-04 19:12:51.654775024 +0200 ++++ new/mkinitrd-dracut.sh 2013-10-04 19:14:25.088173450 +0200 +@@ -236,3 +236,10 @@ + fi + fi + done ++ ++if [ -z "$(type -p update-bootloader)" ] ; then ++ echo 2>&1 "Did not refresh the bootloader. You might need to refresh it manually." ++else ++ update-bootloader --refresh ++fi ++ diff --git a/quiet_options.patch b/quiet_options.patch index 25b21ff..14b6675 100644 --- a/quiet_options.patch +++ b/quiet_options.patch @@ -26,7 +26,7 @@ index d8e92f3..803abc0 100755 -b) read_arg boot_dir "$@" || shift $? if [ ! -d $boot_dir ];then error "Boot directory $boot_dir does not exist" -@@ -123,6 +125,7 @@ done +@@ -128,6 +130,7 @@ done targets=( $targets ) [[ $kernels ]] && kernels=( $kernels ) @@ -34,7 +34,7 @@ index d8e92f3..803abc0 100755 for ((i=0 ; $i<${#targets[@]} ; i++)); do if [[ $img_vers ]];then -@@ -132,9 +135,21 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); do +@@ -137,9 +140,21 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); do fi kernel="${kernels[$i]}" diff --git a/suse_host_only.patch b/suse_host_only.patch index b9f9ed4..ff4d3a9 100644 --- a/suse_host_only.patch +++ b/suse_host_only.patch @@ -52,7 +52,7 @@ index f7b53f1..a1519ea 100755 ;; -i) read_arg initrd_images "$@" || shift $? for initrd_image in $initrd_images;do -@@ -188,6 +193,9 @@ done +@@ -193,6 +198,9 @@ done targets=( $targets ) [[ $kernels ]] && kernels=( $kernels )