From: Antonio Alvarez Feijoo Date: Wed, 16 Mar 2022 16:01:37 +0000 (+0100) Subject: fix(plymouth): hide dpkg-architecture stderr messages X-Git-Tag: 057~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42e9d1889298c3d8badfb6f95e16e048ad83a1f6;p=thirdparty%2Fdracut.git 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. --- diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh index 32aa3ff8b..cc6629bae 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