mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-17 04:12:44 +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() {
|
init__set_hostname() {
|
||||||
local fqdn=$(imds @hostname)
|
local fqdn=$(imds @hostname)
|
||||||
if [ -z "$fqdn" ]; then
|
if [ -z "$fqdn" ]; then
|
||||||
|
echo "no hostname set" >&2
|
||||||
log info "No hostname set"
|
log info "No hostname set"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local host="${fqdn%%\.*}"
|
local host="${fqdn%%\.*}"
|
||||||
if [ -z "$host" ]; then
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user