From 33d97a2560fe4aaab24f90057e825802541a408b Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sun, 22 Oct 2023 09:39:54 -0400 Subject: [PATCH] improve output of remount-secure dracut module --- .../modules.d/20remount-secure/remount-secure.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr/lib/dracut/modules.d/20remount-secure/remount-secure.sh b/usr/lib/dracut/modules.d/20remount-secure/remount-secure.sh index bd10974..7e046be 100755 --- a/usr/lib/dracut/modules.d/20remount-secure/remount-secure.sh +++ b/usr/lib/dracut/modules.d/20remount-secure/remount-secure.sh @@ -11,14 +11,20 @@ remount_hook() { remount_action=$(getarg remountsecure) if getargbool 1 remountnoexec; then - remount-secure --remountnoexec + if ! remount-secure --remountnoexec ; then + warn "'remount-secure --remountnoexec' failed." + fi return 0 fi if getargbool 1 remountsecure; then - remount-secure + if ! remount-secure ; then + warn "'remount-secure' failed." + fi return 0 fi + + warn "Not using remount-secure." } remount_hook