From 01c73895dd7cc76b2d4618e5e8cebf332a38cef5 Mon Sep 17 00:00:00 2001 From: oddlama Date: Fri, 1 Jul 2022 02:11:14 +0200 Subject: [PATCH] chore: clarify that CIDR masks are required for network addresses --- configure | 6 +++--- gentoo.conf.example | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 911677e..16da020 100755 --- a/configure +++ b/configure @@ -394,7 +394,7 @@ function load_default_config() { SYSTEMD_NETWORKD=true SYSTEMD_NETWORKD_INTERFACE_NAME="en*" SYSTEMD_NETWORKD_DHCP=true - SYSTEMD_NETWORKD_ADDRESSES=("192.168.1.100" "fd00::1") + SYSTEMD_NETWORKD_ADDRESSES=("192.168.1.100/32" "fd00::1/64") SYSTEMD_NETWORKD_GATEWAY="192.168.1.1" SYSTEMD_INITRAMFS_SSHD=false @@ -1340,11 +1340,11 @@ function SYSTEMD_NETWORKD_DHCP_menu() { function SYSTEMD_NETWORKD_ADDRESSES_tag() { echo " ├ Addresses"; } function SYSTEMD_NETWORKD_ADDRESSES_label() { echo " ├ ($(ellipsis 20 "${SYSTEMD_NETWORKD_ADDRESSES[*]}"))"; } function SYSTEMD_NETWORKD_ADDRESSES_show() { [[ $STAGE3_VARIANT == *systemd* ]] && is_on "$SYSTEMD_NETWORKD" && is_off "$SYSTEMD_NETWORKD_DHCP"; } -function SYSTEMD_NETWORKD_ADDRESSES_help() { echo "A space-separated list of addresses to assign to the network interface."; } +function SYSTEMD_NETWORKD_ADDRESSES_help() { echo "A space-separated list of addresses with CIDR mask to assign to the network interface."; } function SYSTEMD_NETWORKD_ADDRESSES_menu() { dialog \ --title "Network Addresses" \ - --inputbox "A space-separated list of addresses to assign to the network interface." \ + --inputbox "A space-separated list of addresses with CIDR mask to assign to the network interface." \ "${INPUTBOX_SIZE[@]}" "${SYSTEMD_NETWORKD_ADDRESSES[*]}" \ || return 0 # shellcheck disable=SC2206 diff --git a/gentoo.conf.example b/gentoo.conf.example index 501170a..7942667 100644 --- a/gentoo.conf.example +++ b/gentoo.conf.example @@ -212,8 +212,8 @@ SYSTEMD_NETWORKD=true SYSTEMD_NETWORKD_INTERFACE_NAME="en*" # Whether to use DHCP (systemd [Network] -> DHCP) SYSTEMD_NETWORKD_DHCP=true -# If DHCP is disabled, assign the given list of addresses (systemd [Network] -> Address) -SYSTEMD_NETWORKD_ADDRESSES=("192.168.1.100" "fd00::1") +# If DHCP is disabled, assign the given list of addresses including CIDR mask. (systemd [Network] -> Address) +SYSTEMD_NETWORKD_ADDRESSES=("192.168.1.100/32" "fd00::1/64") # If DHCP is disabled, use the given gateway SYSTEMD_NETWORKD_GATEWAY="192.168.1.1" # Enable sshd in initramfs to allow unlocking encrypted devices / enter emergency shell if needed.