From 42e9d1889298c3d8badfb6f95e16e048ad83a1f6 Mon Sep 17 00:00:00 2001 From: Antonio Alvarez Feijoo Date: Wed, 16 Mar 2022 17:01:37 +0100 Subject: [PATCH] fix(plymouth): hide dpkg-architecture stderr messages dpkg-architecture prints warnings and errors to stderr. If the system does not have gcc installed, it issues a warning: dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation) This fix checks only the value of the queried variable. --- modules.d/50plymouth/module-setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh index 32aa3ff8b9..cc6629bae1 100755 --- a/modules.d/50plymouth/module-setup.sh +++ b/modules.d/50plymouth/module-setup.sh @@ -3,7 +3,9 @@ pkglib_dir() { local _dirs="/usr/lib/plymouth /usr/libexec/plymouth/" if find_binary dpkg-architecture &> /dev/null; then - _dirs+=" /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/plymouth" + local _arch + _arch=$(dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null) + [ -n "$_arch" ] && _dirs+=" /usr/lib/$_arch/plymouth" fi for _dir in $_dirs; do if [ -x "$dracutsysrootdir""$_dir"/plymouth-populate-initrd ]; then