forked from ungleich-public/cdist
[__hostname] Little bit of clean up
This commit is contained in:
parent
88947d45b3
commit
a885082534
1 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,7 @@ else
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "${max_len}" && test "$(printf '%s' "${name_should}" | wc -c)" -gt "${max_len}"
|
if test -n "$max_len" && test "$(printf '%s' "$name_should" | wc -c)" -gt "$max_len"
|
||||||
then
|
then
|
||||||
printf "Host name too long. Up to %u characters allowed.\n" "${max_len}" >&2
|
printf "Host name too long. Up to %u characters allowed.\n" "${max_len}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -93,10 +93,10 @@ in
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
gentoo)
|
gentoo)
|
||||||
|
# Only write to /etc/conf.d/hostname on OpenRC-based installations.
|
||||||
|
# On systemd use hostnamectl(1) in gencode-remote.
|
||||||
if test -z "$has_hostnamectl"
|
if test -z "$has_hostnamectl"
|
||||||
then
|
then
|
||||||
# Only write to /etc/conf.d/hostname on OpenRC-based installations.
|
|
||||||
# On systemd use hostnamectl(1) in gencode-remote.
|
|
||||||
__key_value '/etc/conf.d/hostname:hostname' \
|
__key_value '/etc/conf.d/hostname:hostname' \
|
||||||
--file /etc/conf.d/hostname \
|
--file /etc/conf.d/hostname \
|
||||||
--delimiter '=' --exact_delimiter \
|
--delimiter '=' --exact_delimiter \
|
||||||
|
|
Loading…
Reference in a new issue