live-proxmox/live-build/config/includes.chroot_after_packages/etc/dhcp/dhclient-enter-hooks.d/hostname

10 lines
144 B
Plaintext
Raw Normal View History

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