mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-15 11:22:43 +03:00
add STDERR output for problems with set_hostname
This commit is contained in:
parent
de66c6049e
commit
229fc70b42
@ -199,13 +199,15 @@ init__enable_sshd() {
|
||||
init__set_hostname() {
|
||||
local fqdn=$(imds @hostname)
|
||||
if [ -z "$fqdn" ]; then
|
||||
echo "no hostname set" >&2
|
||||
log info "No hostname set"
|
||||
return
|
||||
fi
|
||||
|
||||
local host="${fqdn%%\.*}"
|
||||
if [ -z "$host" ]; then
|
||||
log err "$fqdn is not a valid hostname"
|
||||
echo "$hostname is not a valid FQDN" >&2
|
||||
log err "$fqdn is not a valid FQDN"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user