|
#!/bin/sh
|
|
set -e
|
|
|
|
if [ -n "${new_host_name}" ]; then
|
|
fullname="${new_host_name}"
|
|
if [ -n "${new_domain_name}" ]; then
|
|
fullname="${fullname}.${new_domain_name}"
|
|
fi
|
|
cat << EOName > /etc/hostname
|
|
${fullname}
|
|
EOName
|
|
unset fullname
|
|
hostname -F /etc/hostname
|
|
fi
|