set_simple_config_key is buggy
Originally created by @kytv on #9122 (Redmine)
set_simple_config_key()
in
/usr/local/lib/tails-shell-library/common.sh
doesn’t update config
keys but sets them, replacing whatever is in the file.
Here’s simple testcase:
root@amnesia:/tmp# cat > testfile << EOF
value1=a
value2=b
value3=c
EOF
root@amnesia:/tmp# cat testfile
value1=a
value2=b
value3=c
root@amnesia:/tmp# . /usr/local/lib/tails-shell-library/common.sh
root@amnesia:/tmp# set_simple_config_key value2 "bird" /tmp/testfile
root@amnesia:/tmp# cat /tmp/testfile
value2=bird
Feature Branch: bugfix/9122-fix-set_simple_config_key