|
@ -988,6 +988,18 @@ cmdline.spec::cmd:vps-setup:run() { |
|
|
print_status noop |
|
|
print_status noop |
|
|
Feed |
|
|
Feed |
|
|
fi |
|
|
fi |
|
|
|
|
|
Elt "Checking consistency between /etc/hostname and \`hostname\`..." |
|
|
|
|
|
etc_hostname="$(ssh:run "$host" -- $sudo_if_necessary cat /etc/hostname)" |
|
|
|
|
|
transient_hostname="$(ssh:run "$host" -- $sudo_if_necessary hostname)" |
|
|
|
|
|
if [ "$etc_hostname" != "$transient_hostname" ]; then |
|
|
|
|
|
print_info "change" |
|
|
|
|
|
ssh:run "$host" -- $sudo_if_necessary hostname "$etc_hostname" |
|
|
|
|
|
Feedback || return 1 |
|
|
|
|
|
else |
|
|
|
|
|
print_info "consistent" |
|
|
|
|
|
print_status noop |
|
|
|
|
|
Feed |
|
|
|
|
|
fi |
|
|
else |
|
|
else |
|
|
info "Not changing domain as '$HOST' doesn't seem to be final domain." |
|
|
info "Not changing domain as '$HOST' doesn't seem to be final domain." |
|
|
fi |
|
|
fi |
|
|