From 14cf205579ff65fa765d7574e5d0e301a30a1904 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Wed, 21 May 2025 08:36:16 -0400 Subject: [PATCH] fix --- etc/profile.d/30_security-misc.sh | 6 +++--- usr/bin/remount-secure | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/profile.d/30_security-misc.sh b/etc/profile.d/30_security-misc.sh index c1adb22..8cb5673 100755 --- a/etc/profile.d/30_security-misc.sh +++ b/etc/profile.d/30_security-misc.sh @@ -4,8 +4,8 @@ ## See the file COPYING for copying conditions. if [ -z "$XDG_CONFIG_DIRS" ]; then - XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_DIRS="/etc/xdg" fi -if ! echo "$XDG_CONFIG_DIRS" | grep --quiet /usr/share/security-misc/ ; then - export XDG_CONFIG_DIRS=/usr/share/security-misc/:$XDG_CONFIG_DIRS +if ! printf '%s\n' "$XDG_CONFIG_DIRS" | grep -- "/usr/share/security-misc/" >/dev/null 2>/dev/null ; then + export XDG_CONFIG_DIRS="/usr/share/security-misc/:$XDG_CONFIG_DIRS" fi diff --git a/usr/bin/remount-secure b/usr/bin/remount-secure index 865867d..957ad46 100755 --- a/usr/bin/remount-secure +++ b/usr/bin/remount-secure @@ -180,7 +180,7 @@ remount_secure() { $output_command "INFO: '$mount_folder' old_mount_options: '$old_mount_options'" - if echo "$old_mount_options" | grep --quiet "$intended_mount_options" ; then + if printf '%s\n' "$old_mount_options" | grep "$intended_mount_options" >/dev/null 2>/dev/null ; then $output_command "INFO: '$mount_folder' has already intended mount options. ('$intended_mount_options')" return 0 fi