dracut/0062-dracut_install-honor-silent-flag.patch
Harald Hoyer b386772815 dracut-044-75
- fix for systemd >= 230
- git snapshot
2016-06-07 10:24:44 +02:00

46 lines
2.0 KiB
Diff

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