nixos-rebuild: Avoid subshell reading hostname
Co-Authored-By: Jörg Thalheim <Mic92@users.noreply.github.com>
This commit is contained in:
parent
7ff2e743e8
commit
2a0cf385d2
|
@ -256,7 +256,7 @@ if [[ -n $flake ]]; then
|
|||
flakeAttr="${BASH_REMATCH[2]}"
|
||||
fi
|
||||
if [[ -z $flakeAttr ]]; then
|
||||
hostname=$(cat /proc/sys/kernel/hostname)
|
||||
read -r hostname < /proc/sys/kernel/hostname
|
||||
if [[ -z $hostname ]]; then
|
||||
hostname=default
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue