From db1ca2fadd20d0a4fb5a0fe18adcd8c960db9cf3 Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Tue, 29 May 2018 11:03:28 +0200 Subject: fedora-readonly: command substitution warning fixed (null-byte input) Due to some change in bash-4.4, it started to give out warnings about ignored null-byte characters in the command substitution: https://bugzilla.redhat.com/show_bug.cgi?id=1472137#c2 Resolves: RHBZ#1583338 --- systemd/fedora-readonly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/fedora-readonly b/systemd/fedora-readonly index 83b1747b..a3679580 100755 --- a/systemd/fedora-readonly +++ b/systemd/fedora-readonly @@ -11,7 +11,7 @@ HOSTNAME="$(hostname)" # Check SELinux status SELINUX_STATE= -if [ -e "/sys/fs/selinux/enforce" ] && [ "$(cat /proc/self/attr/current)" != "kernel" ]; then +if [ -e "/sys/fs/selinux/enforce" ] && [ "$(cat /proc/self/attr/current | tr -d '\000' )" != "kernel" ]; then if [ -r "/sys/fs/selinux/enforce" ] ; then SELINUX_STATE=$(cat "/sys/fs/selinux/enforce") else -- cgit v1.2.1