home · contact · privacy
Enhance bookworm setup.
[config] / bookworm / setup_scripts / set_hostname_and_fqdn.sh
index a3b9f9a9651747229b7442eb5fea1e3a87a5d985..b367906e07749d33e7ee5c3270cd90040a1cde50 100755 (executable)
 #
 # Ignores IPv6s.
 set -e
+. ./misc.sh
+
+expect_n_args 1 "(hostname, fqdn)" "$@"
 
 hostname="$1"
 fqdn="$2"
-if [ "${hostname}" = "" ]; then
-    echo "Need hostname as argument."
-    false
-fi
 echo "${hostname}" > /etc/hostname
 hostname "${hostname}"