X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=bookworm%2Fsetup_scripts%2Fset_hostname_and_fqdn.sh;h=b367906e07749d33e7ee5c3270cd90040a1cde50;hb=c23514e257843acb215e435b2da06a24c11f39dd;hp=a3b9f9a9651747229b7442eb5fea1e3a87a5d985;hpb=3c39ebec559109322bb76b7689051049d8870ad5;p=config diff --git a/bookworm/setup_scripts/set_hostname_and_fqdn.sh b/bookworm/setup_scripts/set_hostname_and_fqdn.sh index a3b9f9a..b367906 100755 --- a/bookworm/setup_scripts/set_hostname_and_fqdn.sh +++ b/bookworm/setup_scripts/set_hostname_and_fqdn.sh @@ -13,13 +13,12 @@ # # 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}"