Blame 0047-dracut-init.sh-mark-error-messages-with-FAILED.patch

Harald Hoyer b38677
From ff8f7026897edf1d0aa9c73b9f7a3d21b1b51da3 Mon Sep 17 00:00:00 2001
Harald Hoyer b38677
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer b38677
Date: Mon, 11 Apr 2016 15:22:56 +0200
Harald Hoyer b38677
Subject: [PATCH] dracut-init.sh: mark error messages with FAILED
Harald Hoyer b38677
Harald Hoyer b38677
---
Harald Hoyer b38677
 dracut-init.sh | 16 ++++++++--------
Harald Hoyer b38677
 1 file changed, 8 insertions(+), 8 deletions(-)
Harald Hoyer b38677
Harald Hoyer b38677
diff --git a/dracut-init.sh b/dracut-init.sh
Harald Hoyer b38677
index 2431171..a8b78ce 100644
Harald Hoyer b38677
--- a/dracut-init.sh
Harald Hoyer b38677
+++ b/dracut-init.sh
Harald Hoyer b38677
@@ -168,7 +168,7 @@ fi
Harald Hoyer b38677
 inst_dir() {
Harald Hoyer b38677
     [[ -e ${initdir}/"$1" ]] && return 0  # already there
Harald Hoyer b38677
     $DRACUT_INSTALL ${initdir:+-D "$initdir"} -d "$@"
Harald Hoyer b38677
-    (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} -d "$@" || :
Harald Hoyer b38677
+    (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} -d "$@" || :
Harald Hoyer b38677
 }
Harald Hoyer b38677
 
Harald Hoyer b38677
 inst() {
Harald Hoyer b38677
@@ -179,7 +179,7 @@ inst() {
Harald Hoyer b38677
     fi
Harald Hoyer b38677
     [[ -e ${initdir}/"${2:-$1}" ]] && return 0  # already there
Harald Hoyer b38677
     $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
Harald Hoyer b38677
-    (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
Harald Hoyer b38677
+    (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
Harald Hoyer b38677
 }
Harald Hoyer b38677
 
Harald Hoyer b38677
 inst_simple() {
Harald Hoyer b38677
@@ -191,7 +191,7 @@ inst_simple() {
Harald Hoyer b38677
     [[ -e ${initdir}/"${2:-$1}" ]] && return 0  # already there
Harald Hoyer b38677
     [[ -e $1 ]] || return 1  # no source
Harald Hoyer b38677
     $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"
Harald Hoyer b38677
-    (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@" || :
Harald Hoyer b38677
+    (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@" || :
Harald Hoyer b38677
 }
Harald Hoyer b38677
 
Harald Hoyer b38677
 inst_symlink() {
Harald Hoyer b38677
@@ -203,14 +203,14 @@ inst_symlink() {
Harald Hoyer b38677
     [[ -e ${initdir}/"${2:-$1}" ]] && return 0  # already there
Harald Hoyer b38677
     [[ -L $1 ]] || return 1
Harald Hoyer b38677
     $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
Harald Hoyer b38677
-    (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
Harald Hoyer b38677
+    (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
Harald Hoyer b38677
 }
Harald Hoyer b38677
 
Harald Hoyer b38677
 inst_multiple() {
Harald Hoyer b38677
     local _ret
Harald Hoyer b38677
     $DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} "$@"
Harald Hoyer b38677
     _ret=$?
Harald Hoyer b38677
-    (($_ret != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
Harald Hoyer b38677
+    (($_ret != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
Harald Hoyer b38677
     return $_ret
Harald Hoyer b38677
 }
Harald Hoyer b38677
 
Harald Hoyer b38677
@@ -227,17 +227,17 @@ inst_library() {
Harald Hoyer b38677
     [[ -e ${initdir}/"${2:-$1}" ]] && return 0  # already there
Harald Hoyer b38677
     [[ -e $1 ]] || return 1  # no source
Harald Hoyer b38677
     $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
Harald Hoyer b38677
-    (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
Harald Hoyer b38677
+    (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
Harald Hoyer b38677
 }
Harald Hoyer b38677
 
Harald Hoyer b38677
 inst_binary() {
Harald Hoyer b38677
     $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} "$@"
Harald Hoyer b38677
-    (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} "$@" || :
Harald Hoyer b38677
+    (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} "$@" || :
Harald Hoyer b38677
 }
Harald Hoyer b38677
 
Harald Hoyer b38677
 inst_script() {
Harald Hoyer b38677
     $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
Harald Hoyer b38677
-    (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} "$@" || :
Harald Hoyer b38677
+    (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l}  ${DRACUT_FIPS_MODE:+-f} "$@" || :
Harald Hoyer b38677
 }
Harald Hoyer b38677
 
Harald Hoyer b38677
 mark_hostonly() {