[__hostname] Use __key_value exact_delimiter for shell-like files

This commit is contained in:
Dennis Camera 2019-10-06 18:01:58 +02:00
parent 77210c349e
commit 7bf203509b

View file

@ -49,21 +49,21 @@ case "$os" in
centos|fedora|redhat|scientific)
__key_value sysconfig-hostname \
--file /etc/sysconfig/network \
--delimiter '=' \
--delimiter '=' --exact_delimiter \
--key HOSTNAME \
--value "$name_should" --exact_delimiter
--value "\"$name_should\""
;;
freebsd)
__key_value rcconf-hostname \
--file /etc/rc.conf \
--delimiter '=' \
--delimiter '=' --exact_delimiter \
--key 'hostname' \
--value "$name_should"
;;
netbsd)
__key_value rcconf-hostname \
--file /etc/rc.conf \
--delimiter '=' \
--delimiter '=' --exact_delimiter \
--key 'hostname' \
--value "\"$name_should\""
# To avoid confusion, ensure that the hostname is only stored once