|
|
fe0dde |
From 1c0f141f863736b2c5c47d6d9f20b75c8cbf8318 Mon Sep 17 00:00:00 2001
|
|
|
fe0dde |
From: Gabriel Becker <ggasparb@redhat.com>
|
|
|
fe0dde |
Date: Tue, 10 Nov 2020 18:10:17 +0100
|
|
|
fe0dde |
Subject: [PATCH] Fix bash_dconf_settings to grep whole keyword alike.
|
|
|
fe0dde |
|
|
|
fe0dde |
---
|
|
|
fe0dde |
.../dconf_gnome_disable_automount/tests/wrong_value.fail.sh | 3 +++
|
|
|
fe0dde |
shared/macros-bash.jinja | 2 +-
|
|
|
fe0dde |
2 files changed, 4 insertions(+), 1 deletion(-)
|
|
|
fe0dde |
|
|
|
fe0dde |
diff --git a/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount/tests/wrong_value.fail.sh b/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount/tests/wrong_value.fail.sh
|
|
|
fe0dde |
index 35c6e417ad..0272781515 100644
|
|
|
fe0dde |
--- a/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount/tests/wrong_value.fail.sh
|
|
|
fe0dde |
+++ b/linux_os/guide/system/software/gnome/gnome_media_settings/dconf_gnome_disable_automount/tests/wrong_value.fail.sh
|
|
|
fe0dde |
@@ -5,3 +5,6 @@
|
|
|
fe0dde |
|
|
|
fe0dde |
install_dconf_and_gdm_if_needed
|
|
|
fe0dde |
clean_dconf_settings
|
|
|
fe0dde |
+
|
|
|
fe0dde |
+add_dconf_setting "org/gnome/desktop/media-handling" "automount-open" "false" "local.d" "00-security-settings"
|
|
|
fe0dde |
+add_dconf_lock "org/gnome/desktop/media-handling" "automount-open" "local.d" "00-security-settings"
|
|
|
fe0dde |
diff --git a/shared/macros-bash.jinja b/shared/macros-bash.jinja
|
|
|
fe0dde |
index ee48bec12d..0add877cbc 100644
|
|
|
fe0dde |
--- a/shared/macros-bash.jinja
|
|
|
fe0dde |
+++ b/shared/macros-bash.jinja
|
|
|
fe0dde |
@@ -181,7 +181,7 @@ then
|
|
|
fe0dde |
printf '%s=%s\n' "{{{ key }}}" "{{{ value }}}" >> ${DCONFFILE}
|
|
|
fe0dde |
else
|
|
|
fe0dde |
escaped_value="$(sed -e 's/\\/\\\\/g' <<< "{{{ value }}}")"
|
|
|
fe0dde |
- if grep -q "^\\s*{{{ key }}}" "${SETTINGSFILES[@]}"
|
|
|
fe0dde |
+ if grep -q "^\\s*{{{ key }}}\\s*=" "${SETTINGSFILES[@]}"
|
|
|
fe0dde |
then
|
|
|
fe0dde |
sed -i "s/\\s*{{{ key }}}\\s*=\\s*.*/{{{ key }}}=${escaped_value}/g" "${SETTINGSFILES[@]}"
|
|
|
fe0dde |
else
|