From: Jonas Witschel Date: Fri, 30 Aug 2019 12:45:15 +0000 (+0200) Subject: dracut.sh: suppress "ignored null byte in input" warning X-Git-Tag: 050~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a010864565c60082bb2809d467cfc6c97e918c7;p=thirdparty%2Fdracut.git dracut.sh: suppress "ignored null byte in input" warning Since Bash 4.4, command substitutions containing null bytes produce a warning of the form /usr/sbin/dracut: line 1958: warning: command substitution: ignored null byte in input Remove the trailing null byte from the UEFI kernel command line file before printing it to suppress this warning. --- diff --git a/dracut.sh b/dracut.sh index 31eb97d55..87fcddfed 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1955,7 +1955,7 @@ if [[ $uefi = yes ]]; then echo -ne "\x00" >> "$uefi_outdir/cmdline.txt" dinfo "Using UEFI kernel cmdline:" - dinfo $(< "$uefi_outdir/cmdline.txt") + dinfo $(tr -d '\000' < "$uefi_outdir/cmdline.txt") [[ -s /usr/lib/os-release ]] && uefi_osrelease="/usr/lib/os-release" [[ -s /etc/os-release ]] && uefi_osrelease="/etc/os-release"