mirror of
https://github.com/Spearfoot/disk-burnin-and-testing.git
synced 2026-11-20 06:56:19 -05:00
extend hostname enquiry
For modern systemd-based systems (e.g. Arch), where command hostname might not exist anymore
This commit is contained in:
parent
66c5bb6d52
commit
146f329c24
1 changed files with 2 additions and 0 deletions
|
|
@ -285,6 +285,8 @@ readonly LOG_DIR
|
|||
|
||||
# System information
|
||||
readonly HOSTNAME="$(hostname)"
|
||||
# Try command hostnamectl if HOSTNAME is unset or empty
|
||||
[ -z HOSTNAME ] && readonly HOSTNAME="$(hostnamectl --static)"
|
||||
readonly OS_FLAVOR="$(uname)"
|
||||
|
||||
# SMART static information
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue