From 2d4524108445829d7ac80e828e9a1442cf038a6b Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Thu, 12 Oct 2023 11:37:01 -0400 Subject: [PATCH] avoid duplicate environment variables --- etc/profile.d/security-misc.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/profile.d/security-misc.sh b/etc/profile.d/security-misc.sh index 51ba00e..026a702 100755 --- a/etc/profile.d/security-misc.sh +++ b/etc/profile.d/security-misc.sh @@ -6,7 +6,9 @@ if [ -z "$XDG_CONFIG_DIRS" ]; then XDG_CONFIG_DIRS=/etc/xdg fi -export XDG_CONFIG_DIRS=/usr/share/security-misc/:$XDG_CONFIG_DIRS +if ! echo "$XDG_CONFIG_DIRS" | grep --quiet /usr/share/security-misc/ ; then + export XDG_CONFIG_DIRS=/usr/share/security-misc/:$XDG_CONFIG_DIRS +fi if [ -x /usr/libexec/security-misc/panic-on-oops ]; then sudo --non-interactive /usr/libexec/security-misc/panic-on-oops