mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-21 19:47:21 +03:00
Fix hostname detection when hostname binary not present
This commit is contained in:
parent
ef9adc92c8
commit
3f3efab221
@ -18,8 +18,13 @@ trap 'cleanup_on_bootstrap_exit' EXIT
|
||||
data_started="n"
|
||||
data_complete="n"
|
||||
if [ -z "$HOSTNAME" ]; then
|
||||
hostname=$(hostname)
|
||||
if [ -z "$hostname" ]; then hostname="_"; fi
|
||||
hostname=$(hostname 2> /dev/null)
|
||||
if [ -z "$hostname" ]; then
|
||||
hostname=$(hostnamectl hostname 2> /dev/null)
|
||||
if [ -z "$hostname" ]; then
|
||||
hostname="_";
|
||||
fi
|
||||
fi
|
||||
else
|
||||
hostname="$HOSTNAME"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user