Blame 0062-dracut_install-honor-silent-flag.patch

Harald Hoyer b38677
From fa295f0bcde8c8d1205cf53ebe6e5dc46629200a Mon Sep 17 00:00:00 2001
Harald Hoyer b38677
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer b38677
Date: Fri, 15 Apr 2016 15:25:27 +0200
Harald Hoyer b38677
Subject: [PATCH] dracut_install: honor --silent flag
Harald Hoyer b38677
Harald Hoyer b38677
---
Harald Hoyer b38677
 dracut-init.sh                  | 8 +++++++-
Harald Hoyer b38677
 modules.d/50drm/module-setup.sh | 2 +-
Harald Hoyer b38677
 2 files changed, 8 insertions(+), 2 deletions(-)
Harald Hoyer b38677
Harald Hoyer b38677
diff --git a/dracut-init.sh b/dracut-init.sh
Harald Hoyer b38677
index 8d1d9fa..1056a31 100644
Harald Hoyer b38677
--- a/dracut-init.sh
Harald Hoyer b38677
+++ b/dracut-init.sh
Harald Hoyer b38677
@@ -219,10 +219,16 @@ dracut_install() {
Harald Hoyer b38677
 }
Harald Hoyer b38677
 
Harald Hoyer b38677
 dracut_instmods() {
Harald Hoyer b38677
+    local _silent=0;
Harald Hoyer b38677
+    local i;
Harald Hoyer b38677
     [[ $no_kernel = yes ]] && return
Harald Hoyer b38677
+    for i in "$@"; do
Harald Hoyer b38677
+        [[ $i == "--silent" ]] && silent=1
Harald Hoyer b38677
+    done
Harald Hoyer b38677
+
Harald Hoyer b38677
     $DRACUT_INSTALL \
Harald Hoyer b38677
         ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@"
Harald Hoyer b38677
-    (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || :
Harald Hoyer b38677
+    (($? != 0)) && (($silent == 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || :
Harald Hoyer b38677
 }
Harald Hoyer b38677
 
Harald Hoyer b38677
 inst_library() {
Harald Hoyer b38677
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
Harald Hoyer b38677
index 661dde9..6106d8c 100755
Harald Hoyer b38677
--- a/modules.d/50drm/module-setup.sh
Harald Hoyer b38677
+++ b/modules.d/50drm/module-setup.sh
Harald Hoyer b38677
@@ -34,7 +34,7 @@ installkernel() {
Harald Hoyer b38677
     if [[ $hostonly ]]; then
Harald Hoyer b38677
         for i in /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias; do
Harald Hoyer b38677
             [[ -e $i ]] || continue
Harald Hoyer b38677
-            if hostonly="" dracut_instmods -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i) 2>/dev/null; then
Harald Hoyer b38677
+            if hostonly="" dracut_instmods --silent -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i); then
Harald Hoyer b38677
                 if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then
Harald Hoyer b38677
                     hostonly='' instmods amdkfd
Harald Hoyer b38677
                 fi