]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
refactor(dracut.sh): use logger functions instead of printf
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Mon, 22 Aug 2022 08:06:34 +0000 (10:06 +0200)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Fri, 26 Aug 2022 07:58:36 +0000 (07:58 +0000)
dracut-logger is sourced in dracut-init, so any printf calls after sourcing
dracut-init should be replaced with logger functions.

dracut.sh

index b0506749fb3ab2a919b9edf8f31f8f05235187e5..bfe35fbac0b0e45d6fb204e2fdefcf832ae4f8d1 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1310,8 +1310,8 @@ fi
 
 # shellcheck disable=SC2154
 if [[ $no_kernel != yes ]] && ! [[ -d $srcmods ]]; then
-    printf "%s\n" "dracut: Cannot find module directory $srcmods" >&2
-    printf "%s\n" "dracut: and --no-kernel was not specified" >&2
+    dfatal "Cannot find module directory $srcmods"
+    dfatal "and --no-kernel was not specified"
     exit 1
 fi