diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-03-19 19:57:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-03-19 19:57:19 +0000 |
commit | a52f6a2a7cc32326dca1aaae098ded5f39271b6e (patch) | |
tree | 07d3717fb822b102cb87dd19fd308a0bacfbf591 /share/scripts/debconf | |
parent | Adding upstream version 20190304. (diff) | |
download | open-infrastructure-compute-tools-upstream/20190319.tar.xz open-infrastructure-compute-tools-upstream/20190319.zip |
Adding upstream version 20190319.upstream/20190319
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | share/scripts/debconf | 217 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0002-preseed-debconf | 5 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0003-debconf | 187 | ||||
-rw-r--r-- | share/scripts/debconf.d/0003-debconf.templates | 63 |
4 files changed, 401 insertions, 71 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf index fbabab4..46f0381 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -139,15 +139,6 @@ Chroot () ${@} } -CIDR () -{ - x=${1##*255.} - set -- 0^^^128^192^224^240^248^252^254^ $(( (${#1} - ${#x})*2 )) ${x%%.*} - - x=${1%%$3*} - echo $(( $2 + (${#x}/4) )) -} - Upgrade_system () { DIRECTORY="${1}" @@ -474,11 +465,14 @@ EOF if [ -n "${DIG}" ] then - IPV4_ADDRESS1="$(${DIG} +short ${NAME} | tail -n1)" + IPV4_ADDRESS1="$(${DIG} A +short ${NAME} | tail -n1)" IPV4_ADDRESS1_PART1="$(echo ${IPV4_ADDRESS1} | cut -d. -f1)" IPV4_ADDRESS1_PART2="$(echo ${IPV4_ADDRESS1} | cut -d. -f2)" IPV4_ADDRESS1_PART3="$(echo ${IPV4_ADDRESS1} | cut -d. -f3)" IPV4_ADDRESS1_PART4="$(echo ${IPV4_ADDRESS1} | cut -d. -f4)" + + IPV6_ADDRESS1="$(${DIG} AAAA +short ${NAME} | tail -n1)" + # TODO: address parts fi sed -e "s|@NAME@|${NAME}|g" \ @@ -487,6 +481,7 @@ EOF -e "s|@IPV4_ADDRESS1_PART2@|${IPV4_ADDRESS1_PART2}|g" \ -e "s|@IPV4_ADDRESS1_PART3@|${IPV4_ADDRESS1_PART3}|g" \ -e "s|@IPV4_ADDRESS1_PART4@|${IPV4_ADDRESS1_PART4}|g" \ + -e "s|@IPV6_ADDRESS1@|${IPV6_ADDRESS1}|g" \ "${FILE}" >> "${DIRECTORY}/preseed.cfg" done @@ -631,27 +626,50 @@ Configure_network () fi # Create /etc/hosts - case "${NETWORK1_IPV4_METHOD}" in - none|dhcp) + rm -f "${DIRECTORY}/etc/hosts.tmp" -cat > "${DIRECTORY}/etc/hosts.tmp" << EOF -127.0.0.1 localhost ${NAME} + if [ -n "${NETWORK1_IPV4_ADDRESS}" ] + then -# The following lines are desirable for IPv6 capable hosts -::1 ip6-localhost ip6-loopback -fe00::0 ip6-localnet -ff00::0 ip6-mcastprefix -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters +cat >> "${DIRECTORY}/etc/hosts.tmp" << EOF +${NETWORK1_IPV4_ADDRESS} ${NAME} EOF - ;; + fi + + if [ -n "${NETWORK1_IPV6_ADDRESS}" ] + then + +cat >> "${DIRECTORY}/etc/hosts.tmp" << EOF +${NETWORK1_IPV6_ADDRESS} ${NAME} +EOF - static) + fi + + if [ -n "${NETWORK1_IPV4_ADDRESS}" ] || [ -n "${NETWORK1_IPV6_ADDRESS}" ] + then + echo >> "${DIRECTORY}/etc/hosts.tmp" + fi + + if [ -z "${NETWORK1_IPV4_ADDRESS}" ] && [ -z "${NETWORK1_IPV6_ADDRESS}" ] + then + # localhost only + +cat > "${DIRECTORY}/etc/hosts.tmp" << EOF +127.0.0.1 localhost ${NAME} +::1 localhost ${NAME} +EOF + + else cat > "${DIRECTORY}/etc/hosts.tmp" << EOF 127.0.0.1 localhost -${NETWORK1_IPV4_ADDRESS} ${NAME} +::1 localhost +EOF + + fi + +cat >> "${DIRECTORY}/etc/hosts.tmp" << EOF # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback @@ -661,9 +679,6 @@ ff02::1 ip6-allnodes ff02::2 ip6-allrouters EOF - ;; - esac - mv "${DIRECTORY}/etc/hosts.tmp" "${DIRECTORY}/etc/hosts" } @@ -684,54 +699,66 @@ Configure_systemd_networkd () eval IPV4_POST_UP="$`echo NETWORK${NUMBER}_IPV4_POST_UP`" eval IPV4_POST_DOWN="$`echo NETWORK${NUMBER}_IPV4_POST_DOWN`" - if [ -z "${IPV4_METHOD}" ] - then - continue - fi + eval IPV6_COMMENT="$`echo NETWORK${NUMBER}_IPV6_COMMENT`" + eval IPV6_METHOD="$`echo NETWORK${NUMBER}_IPV6_METHOD`" + eval IPV6_ADDRESS="$`echo NETWORK${NUMBER}_IPV6_ADDRESS`" + eval IPV6_GATEWAY="$`echo NETWORK${NUMBER}_IPV6_GATEWAY`" + eval IPV6_NETMASK="$`echo NETWORK${NUMBER}_IPV6_NETMASK`" + eval IPV6_POST_UP="$`echo NETWORK${NUMBER}_IPV6_POST_UP`" + eval IPV6_POST_DOWN="$`echo NETWORK${NUMBER}_IPV6_POST_DOWN`" - IPV4_SUFFIX="$(CIDR ${IPV4_NETMASK})" - IPV4_CIDR="${IPV4_ADDRESS}/${IPV4_SUFFIX}" + if [ "${IPV4_METHOD}" != "none" ] || [ "${IPV6_METHOD}" != "none" ] + then cat > "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF [Match] Name=eno${NUMBER} +EOF + + fi + + if [ -n "${IPV4_METHOD}" ] && [ "${IPV4_METHOD}" != "none" ] + then + +cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF [Network] EOF - if [ -n "${IPV4_COMMENT}" ] - then - echo "Description=${IPV4_COMMENT}" >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" - fi + if [ -n "${IPV4_COMMENT}" ] + then + echo "Description=${IPV4_COMMENT}" >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" + fi - case "${IPV4_METHOD}" in - dhcp) + case "${IPV4_METHOD}" in + dhcp) cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF DHCP=ipv4 EOF - ;; + ;; - static) + static) cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF DHCP=no -Address=${IPV4_CIDR} +Address=${IPV4_ADDRESS}/${IPV4_NETMASK} EOF - if [ -n "${IPV4_GATEWAY}" ] - then + if [ -n "${IPV4_GATEWAY}" ] + then cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF Gateway=${IPV4_GATEWAY} EOF - fi - esac + fi + ;; + esac - if [ -n "${IPV4_POST_UP}" ] - then + if [ -n "${IPV4_POST_UP}" ] + then cat > "${DIRECTORY}/etc/systemd/system/cnt-ipv4-post-up-eno${NUMBER}.service" << EOF [Unit] @@ -747,11 +774,11 @@ ExecStart=/bin/sh -c "${IPV4_POST_UP}" WantedBy=multi-user.target EOF - chroot "${DIRECTORY}" systemctl enable cnt-ipv4-post-up-eno${NUMBER}.service - fi + chroot "${DIRECTORY}" systemctl enable cnt-ipv4-post-up-eno${NUMBER}.service + fi - if [ -n "${IPV4_POST_DOWN}" ] - then + if [ -n "${IPV4_POST_DOWN}" ] + then cat > "${DIRECTORY}/etc/systemd/system/cnt-ipv4-post-down-eno${NUMBER}.service" << EOF [Unit] @@ -767,7 +794,90 @@ ExecStart=/bin/sh -c "${IPV4_POST_DOWN}" WantedBy=multi-user.target EOF - chroot "${DIRECTORY}" systemctl enable cnt-ipv4-post-down-eno${NUMBER}.service + chroot "${DIRECTORY}" systemctl enable cnt-ipv4-post-down-eno${NUMBER}.service + fi + fi + + if [ -n "${IPV6_METHOD}" ] && [ "${IPV6_METHOD}" != "none" ] + then + +cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF + +[Network] +EOF + + if [ -n "${IPV6_COMMENT}" ] + then + echo "Description=${IPV6_COMMENT}" >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" + fi + + case "${IPV6_METHOD}" in + dhcp) + +cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF +DHCP=ipv6 +EOF + + ;; + + static) + +cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF +DHCP=no +Ipv6AcceptRA=no +Address=${IPV6_ADDRESS}/${IPV6_NETMASK} +EOF + + if [ -n "${IPV6_GATEWAY}" ] + then + +cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF +Gateway=${IPV6_GATEWAY} +EOF + + fi + ;; + esac + + if [ -n "${IPV6_POST_UP}" ] + then + +cat > "${DIRECTORY}/etc/systemd/system/cnt-ipv6-post-up-eno${NUMBER}.service" << EOF +[Unit] +Description=${SOFTWARE} IPV6_POST_UP +After=network-online.target +Wants=network-online.target + +[Service] +Type=oneshot +ExecStart=/bin/sh -c "${IPV6_POST_UP}" + +[Install] +WantedBy=multi-user.target +EOF + + chroot "${DIRECTORY}" systemctl enable cnt-ipv6-post-up-eno${NUMBER}.service + fi + + if [ -n "${IPV6_POST_DOWN}" ] + then + +cat > "${DIRECTORY}/etc/systemd/system/cnt-ipv6-post-down-eno${NUMBER}.service" << EOF +[Unit] +Description=${SOFTWARE} IPV6_POST_DOWN +After=network.target +Wants=network.target + +[Service] +Type=oneshot +ExecStart=/bin/sh -c "${IPV6_POST_DOWN}" + +[Install] +WantedBy=multi-user.target +EOF + + chroot "${DIRECTORY}" systemctl enable cnt-ipv6-post-down-eno${NUMBER}.service + fi fi NUMBER="$((${NUMBER} + 1))" @@ -796,8 +906,9 @@ Commands () for NUMBER in $(seq 2 ${NETWORK_NUMBER}) do eval IPV4_METHOD="$`echo NETWORK${NUMBER}_IPV4_METHOD`" + eval IPV6_METHOD="$`echo NETWORK${NUMBER}_IPV6_METHOD`" - if [ -z "${IPV4_METHOD}" ] + if [ -z "${IPV4_METHOD}" ] && [ -z "${IPV6_METHOD}" ] then continue fi diff --git a/share/scripts/debconf.d/0002-preseed-debconf b/share/scripts/debconf.d/0002-preseed-debconf index 9aca6bf..8877654 100755 --- a/share/scripts/debconf.d/0002-preseed-debconf +++ b/share/scripts/debconf.d/0002-preseed-debconf @@ -83,11 +83,13 @@ do if [ -n "${DIG}" ] then - IPV4_ADDRESS1="$(${DIG} +short ${NAME} | tail -n1)" + IPV4_ADDRESS1="$(${DIG} A +short ${NAME} | tail -n1)" IPV4_ADDRESS1_PART1="$(echo ${IPV4_ADDRESS1} | cut -d. -f1)" IPV4_ADDRESS1_PART2="$(echo ${IPV4_ADDRESS1} | cut -d. -f2)" IPV4_ADDRESS1_PART3="$(echo ${IPV4_ADDRESS1} | cut -d. -f3)" IPV4_ADDRESS1_PART4="$(echo ${IPV4_ADDRESS1} | cut -d. -f4)" + + IPV6_ADDRESS1="$(${DIG} AAAA +short ${NAME} | tail -n1)" fi sed -e "s|@NAME@|${NAME}|g" \ @@ -96,6 +98,7 @@ do -e "s|@IPV4_ADDRESS1_PART2@|${IPV4_ADDRESS1_PART2}|g" \ -e "s|@IPV4_ADDRESS1_PART3@|${IPV4_ADDRESS1_PART3}|g" \ -e "s|@IPV4_ADDRESS1_PART4@|${IPV4_ADDRESS1_PART4}|g" \ + -e "s|@IPV6_ADDRESS1@|${IPV6_ADDRESS1}|g" \ "${DEBCONF_PRESEED_FILE}" > "${DIRECTORY}/preseed.cfg" # Apply user specified preseed files diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf index 684261a..02f80a6 100755 --- a/share/scripts/debconf.d/0003-debconf +++ b/share/scripts/debconf.d/0003-debconf @@ -674,19 +674,27 @@ Network_defaults () NETWORK1_VETH="${NETWORK1_VETH:-$VETH_NAME}" NETWORK1_BRIDGE="${NETWORK1_BRIDGE:-bridge0}" + NETWORK1_IPV4_METHOD="${NETWORK1_IPV4_METHOD:-dhcp}" NETWORK1_IPV4_ADDRESS="${NETWORK1_IPV4_ADDRESS:-192.168.1.2}" - NETWORK1_IPV4_NETMASK="${NETWORK1_IPV4_NETMASK:-255.255.255.0}" + NETWORK1_IPV4_NETMASK="${NETWORK1_IPV4_NETMASK:-24}" + + NETWORK1_IPV6_METHOD="${NETWORK1_IPV6_METHOD:-none}" + NETWORK1_IPV6_ADDRESS="${NETWORK1_IPV6_ADDRESS:-fc00::2}" + NETWORK1_IPV6_NETMASK="${NETWORK1_IPV6_NETMASK:-7}" - if [ "${NETWORK1_IPV4_METHOD}" = "static" ] && [ -e /etc/resolv.conf ] + if [ "${NETWORK1_IPV4_METHOD}" = "static" ] || [ "${NETWORK1_IPV6_METHOD}" = "static" ] then - NAMESERVER_SERVER="${NAMESERVER_SERVER:-$(if [ -e /etc/resolv.conf ]; then awk '/^nameserver / {$1=""; print $0}' /etc/resolv.conf; fi)}" - # Workaround to get rid of newlines since debconf can not handle multiline return value in assignments - NAMESERVER_SERVER="$(echo ${NAMESERVER_SERVER})" + if [ -e /etc/resolv.conf ] + then + NAMESERVER_SERVER="${NAMESERVER_SERVER:-$(awk '/^nameserver / {$1=""; print $0}' /etc/resolv.conf)}" + # Workaround to get rid of newlines since debconf can not handle multiline return value in assignments + NAMESERVER_SERVER="$(echo ${NAMESERVER_SERVER})" - NAMESERVER_DOMAIN="${NAMESERVER_DOMAIN:-$(if [ -e /etc/resolv.conf ]; then awk '/^domain / {$1=""; print $0}' /etc/resolv.conf; fi)}" - NAMESERVER_SEARCH="${NAMESERVER_SEARCH:-$(if [ -e /etc/resolv.conf ]; then awk '/^search / {$1=""; print $0}' /etc/resolv.conf; fi)}" - NAMESERVER_OPTIONS="${NAMESERVER_OPTIONS:-$(if [ -e /etc/resolv.conf ]; then awk '/^options / {$1=""; print $0}' /etc/resolv.conf; fi)}" + NAMESERVER_DOMAIN="${NAMESERVER_DOMAIN:-$(awk '/^domain / {$1=""; print $0}' /etc/resolv.conf)}" + NAMESERVER_SEARCH="${NAMESERVER_SEARCH:-$(awk '/^search / {$1=""; print $0}' /etc/resolv.conf)}" + NAMESERVER_OPTIONS="${NAMESERVER_OPTIONS:-$(awk '/^options / {$1=""; print $0}' /etc/resolv.conf)}" + fi fi } @@ -719,6 +727,27 @@ Network () db_get container/network1/ipv4-post-down NETWORK1_IPV4_POST_DOWN="${RET}" # string (w/ empty) + db_get container/network1/ipv6-method + NETWORK1_IPV6_METHOD="${RET}" # select + + db_get container/network1/ipv6-comment + NETWORK1_IPV6_COMMENT="${RET}" # string (w/ empty) + + db_get container/network1/ipv6-address + NETWORK1_IPV6_ADDRESS="${RET}" # string (w/o empty) + + db_get container/network1/ipv6-gateway + NETWORK1_IPV6_GATEWAY="${RET}" # string (w/ empty) + + db_get container/network1/ipv6-netmask + NETWORK1_IPV6_NETMASK="${RET}" # string (w/o empty) + + db_get container/network1/ipv6-post-up + NETWORK1_IPV6_POST_UP="${RET}" # string (w/ empty) + + db_get container/network1/ipv6-post-down + NETWORK1_IPV6_POST_DOWN="${RET}" # string (w/ empty) + db_get container/nameserver/server NAMESERVER_SERVER="${RET}" # string (w/ empty) @@ -760,6 +789,27 @@ Network () db_set container/network1/ipv4-post-down "${NETWORK1_IPV4_POST_DOWN}" db_fset container/network1/ipv4-post-down seen false + db_set container/network1/ipv6-method "${NETWORK1_IPV6_METHOD}" + db_fset container/network1/ipv6-method seen false + + db_set container/network1/ipv6-comment "${NETWORK1_IPV6_COMMENT}" + db_fset container/network1/ipv6-comment seen false + + db_set container/network1/ipv6-address "${NETWORK1_IPV6_ADDRESS}" + db_fset container/network1/ipv6-address seen false + + db_set container/network1/ipv6-gateway "${NETWORK1_IPV6_GATEWAY}" + db_fset container/network1/ipv6-gateway seen false + + db_set container/network1/ipv6-netmask "${NETWORK1_IPV6_NETMASK}" + db_fset container/network1/ipv6-netmask seen false + + db_set container/network1/ipv6-post-up "${NETWORK1_IPV6_POST_UP}" + db_fset container/network1/ipv6-post-up seen false + + db_set container/network1/ipv6-post-down "${NETWORK1_IPV6_POST_DOWN}" + db_fset container/network1/ipv6-post-down seen false + db_set container/nameserver/server "${NAMESERVER_SERVER}" db_fset container/nameserver/server seen false @@ -772,16 +822,16 @@ Network () db_set container/nameserver/options "${NAMESERVER_OPTIONS}" db_fset container/nameserver/options seen false - db_settitle container/title - db_input high container/network1/ipv4-method || true - db_go - db_get container/network1/bridge NETWORK1_BRIDGE="${RET}" # select db_get container/network1/veth NETWORK1_VETH="${RET}" # select + db_settitle container/title + db_input high container/network1/ipv4-method || true + db_go + db_get container/network1/ipv4-method NETWORK1_IPV4_METHOD="${RET}" # select @@ -813,16 +863,57 @@ Network () db_settitle container/title db_input high container/network1/ipv4-post-down || true db_go + ;; + esac + + db_settitle container/title + db_input high container/network1/ipv6-method || true + db_go + + db_get container/network1/ipv6-method + NETWORK1_IPV6_METHOD="${RET}" # select + + case "${NETWORK1_IPV6_METHOD}" in + none|dhcp) + ;; + + static) + db_settitle container/title + db_input high container/network1/ipv6-comment || true + db_go + + db_settitle container/title + db_input high container/network1/ipv6-address || true + db_go + + db_settitle container/title + db_input high container/network1/ipv6-gateway || true + db_go + + db_settitle container/title + db_input high container/network1/ipv6-netmask || true + db_go db_settitle container/title - db_input high container/nameserver/server || true + db_input high container/network1/ipv6-post-up || true + db_go + + db_settitle container/title + db_input high container/network1/ipv6-post-down || true db_go ;; esac + if [ "${NETWORK1_IPV4_METHOD}" = "static" ] || [ "${NETWORK1_IPV6_METHOD}" = "static" ] + then + db_settitle container/title + db_input high container/nameserver/server || true + db_go + fi + NUMBER="1" - while db_get container/network${NUMBER}/ipv4-method && [ "${RET}" ] + while ( db_get container/network${NUMBER}/ipv4-method && [ "${RET}" ] ) || ( db_get container/network${NUMBER}/ipv6-method && [ "${RET}" ] ) do if db_get container/network${NUMBER}/bridge then @@ -834,6 +925,13 @@ Network () eval NETWORK${NUMBER}_VETH="\"${RET}\"" # string (w/o empty) fi + NUMBER="$((${NUMBER} + 1))" + done + + NETWORK_NUMBER="$((${NUMBER} - 1))" + + for NUMBER in $(seq 1 ${NETWORK_NUMBER}) + do if db_get container/network${NUMBER}/ipv4-comment then eval NETWORK${NUMBER}_IPV4_COMMENT="\"${RET}\"" # string (w/ empty) @@ -868,11 +966,45 @@ Network () then eval NETWORK${NUMBER}_IPV4_POST_DOWN="\"${RET}\"" # string (w/ empty) fi - - NUMBER="$((${NUMBER} + 1))" done - NETWORK_NUMBER="$((${NUMBER} - 1))" + for NUMBER in $(seq 1 ${NETWORK_NUMBER}) + do + if db_get container/network${NUMBER}/ipv6-comment + then + eval NETWORK${NUMBER}_IPV6_COMMENT="\"${RET}\"" # string (w/ empty) + fi + + if db_get container/network${NUMBER}/ipv6-method + then + eval NETWORK${NUMBER}_IPV6_METHOD="\"${RET}\"" # select + fi + + if db_get container/network${NUMBER}/ipv6-address + then + eval NETWORK${NUMBER}_IPV6_ADDRESS="\"${RET}\"" # string (w/o empty) + fi + + if db_get container/network${NUMBER}/ipv6-gateway + then + eval NETWORK${NUMBER}_IPV6_GATEWAY="\"${RET}\"" # string (w/ empty) + fi + + if db_get container/network${NUMBER}/ipv6-netmask + then + eval NETWORK${NUMBER}_IPV6_NETMASK="\"${RET}\"" # string (w/o empty) + fi + + if db_get container/network${NUMBER}/ipv6-post-up + then + eval NETWORK${NUMBER}_IPV6_POST_UP="\"${RET}\"" # string (w/ empty) + fi + + if db_get container/network${NUMBER}/ipv6-post-down + then + eval NETWORK${NUMBER}_IPV6_POST_DOWN="\"${RET}\"" # string (w/ empty) + fi + done db_get container/nameserver/server NAMESERVER_SERVER="${RET}" # string (w/ empty) @@ -918,6 +1050,27 @@ Network () eval POST_DOWN="$`echo NETWORK${NUMBER}_IPV4_POST_DOWN`" echo "NETWORK${NUMBER}_IPV4_POST_DOWN=\"${POST_DOWN}\"" >> "${DEBCONF_TMPDIR}/debconf.default" + + eval COMMENT="$`echo NETWORK${NUMBER}_IPV6_COMMENT`" + echo "NETWORK${NUMBER}_IPV6_COMMENT=\"${COMMENT}\"" >> "${DEBCONF_TMPDIR}/debconf.default" + + eval METHOD="$`echo NETWORK${NUMBER}_IPV6_METHOD`" + echo "NETWORK${NUMBER}_IPV6_METHOD=\"${METHOD}\"" >> "${DEBCONF_TMPDIR}/debconf.default" + + eval ADDRESS="$`echo NETWORK${NUMBER}_IPV6_ADDRESS`" + echo "NETWORK${NUMBER}_IPV6_ADDRESS=\"${ADDRESS}\"" >> "${DEBCONF_TMPDIR}/debconf.default" + + eval GATEWAY="$`echo NETWORK${NUMBER}_IPV6_GATEWAY`" + echo "NETWORK${NUMBER}_IPV6_GATEWAY=\"${GATEWAY}\"" >> "${DEBCONF_TMPDIR}/debconf.default" + + eval NETMASK="$`echo NETWORK${NUMBER}_IPV6_NETMASK`" + echo "NETWORK${NUMBER}_IPV6_NETMASK=\"${NETMASK}\"" >> "${DEBCONF_TMPDIR}/debconf.default" + + eval POST_UP="$`echo NETWORK${NUMBER}_IPV6_POST_UP`" + echo "NETWORK${NUMBER}_IPV6_POST_UP=\"${POST_UP}\"" >> "${DEBCONF_TMPDIR}/debconf.default" + + eval POST_DOWN="$`echo NETWORK${NUMBER}_IPV6_POST_DOWN`" + echo "NETWORK${NUMBER}_IPV6_POST_DOWN=\"${POST_DOWN}\"" >> "${DEBCONF_TMPDIR}/debconf.default" done echo "NAMESERVER_SERVER=\"${NAMESERVER_SERVER}\"" >> "${DEBCONF_TMPDIR}/debconf.default" diff --git a/share/scripts/debconf.d/0003-debconf.templates b/share/scripts/debconf.d/0003-debconf.templates index 13899ef..73952a8 100644 --- a/share/scripts/debconf.d/0003-debconf.templates +++ b/share/scripts/debconf.d/0003-debconf.templates @@ -150,6 +150,9 @@ Default: Description: Ethernet Network Mask (IPv4)? What should be the netmask of the current system? . + Note that only the suffix is supported, e.g. '24' + for /24 or '16' for /16. + . This defaults to empty. Template: container/network1/ipv4-post-up @@ -168,6 +171,66 @@ Description: Ethernet post-down Command (IPv4)? . This defaults to empty. +Template: container/network1/ipv6-method +Type: select +Choices: static, none +Default: +Description: Ethernet Interface Method (IPv6)? + What method should be used to configure the ethernet interface? + . + This defaults to none. + +Template: container/network1/ipv6-comment +Type: string +Default: +Description: Ethernet Interface Comment (IPv6)? + What optional comment would you like to give to the ethernet interface? + . + This defaults to empty. + +Template: container/network1/ipv6-address +Type: string +Default: +Description: Ethernet IP Address (IPv6)? + What should be the IP address of the current system? + . + This defaults to fc00::1 (unique local unicast). + +Template: container/network1/ipv6-gateway +Type: string +Default: +Description: Ethernet Gateway Address (IPv6)? + What should be the gateway address of the current system? + . + This defaults to empty. + +Template: container/network1/ipv6-netmask +Type: string +Default: +Description: Ethernet Network Mask (IPv6)? + What should be the netmask of the current system? + . + Note that only the suffix is supported, e.g. '64' + for /64 or '48' for /48. + . + This defaults to empty. + +Template: container/network1/ipv6-post-up +Type: string +Default: +Description: Ethernet post-up Command (IPv6)? + What should be the post-up command for eno1? + . + This defaults to empty. + +Template: container/network1/ipv6-post-down +Type: string +Default: +Description: Ethernet post-down Command (IPv6)? + What should be the post-down command for eno1? + . + This defaults to empty. + Template: container/nameserver/server Type: string Default: |