mirror of
https://github.com/Spearfoot/disk-burnin-and-testing.git
synced 2026-10-26 19:01:41 -04:00
make HOSTNAE readonly only after value is set
This commit is contained in:
parent
146f329c24
commit
75bda45809
1 changed files with 3 additions and 2 deletions
|
|
@ -284,9 +284,10 @@ LOG_DIR="$(printf '%s' "${LOG_DIR}" | awk '{gsub(/\/+$/, ""); printf $1}')"
|
|||
readonly LOG_DIR
|
||||
|
||||
# System information
|
||||
readonly HOSTNAME="$(hostname)"
|
||||
HOSTNAME="$(hostname)"
|
||||
# Try command hostnamectl if HOSTNAME is unset or empty
|
||||
[ -z HOSTNAME ] && readonly HOSTNAME="$(hostnamectl --static)"
|
||||
[ -z HOSTNAME ] && HOSTNAME="$(hostnamectl --static)"
|
||||
readonly HOSTNAME
|
||||
readonly OS_FLAVOR="$(uname)"
|
||||
|
||||
# SMART static information
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue