summaryrefslogtreecommitdiffstats
path: root/share/build-scripts/debconf.d/0003-debconf
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xshare/build-scripts/debconf.d/0003-debconf38
-rw-r--r--share/build-scripts/debconf.d/0003-debconf.templates16
2 files changed, 54 insertions, 0 deletions
diff --git a/share/build-scripts/debconf.d/0003-debconf b/share/build-scripts/debconf.d/0003-debconf
index c1c4e79..4b6a57f 100755
--- a/share/build-scripts/debconf.d/0003-debconf
+++ b/share/build-scripts/debconf.d/0003-debconf
@@ -680,10 +680,12 @@ Network_defaults ()
NETWORK1_BRIDGE="${NETWORK1_BRIDGE:-bridge0}"
NETWORK1_IPV4_METHOD="${NETWORK1_IPV4_METHOD:-dhcp}"
+ NETWORK1_IPV4_ADDRESS_DNS="${NETWORK1_IPV4_ADDRESS_DNS:-${NAME}}"
NETWORK1_IPV4_ADDRESS="${NETWORK1_IPV4_ADDRESS:-192.168.1.2}"
NETWORK1_IPV4_NETMASK="${NETWORK1_IPV4_NETMASK:-24}"
NETWORK1_IPV6_METHOD="${NETWORK1_IPV6_METHOD:-none}"
+ NETWORK1_IPV6_ADDRESS_DNS="${NETWORK1_IPV6_ADDRESS_DNS:-${NAME}}"
NETWORK1_IPV6_ADDRESS="${NETWORK1_IPV6_ADDRESS:-fc00::2}"
NETWORK1_IPV6_NETMASK="${NETWORK1_IPV6_NETMASK:-7}"
@@ -716,6 +718,9 @@ Network ()
db_get container/network1/ipv4-comment
NETWORK1_IPV4_COMMENT="${RET}" # string (w/ empty)
+ db_get container/network1/ipv4-address-dns
+ NETWORK1_IPV4_ADDRESS_DNS="${RET:-${NAME}}" # string (w/o empty)
+
db_get container/network1/ipv4-address
NETWORK1_IPV4_ADDRESS="${RET}" # string (w/o empty)
@@ -737,6 +742,9 @@ Network ()
db_get container/network1/ipv6-comment
NETWORK1_IPV6_COMMENT="${RET}" # string (w/ empty)
+ db_get container/network1/ipv6-address-dns
+ NETWORK1_IPV6_ADDRESS_DNS="${RET:-${NAME}}" # string (w/o empty)
+
db_get container/network1/ipv6-address
NETWORK1_IPV6_ADDRESS="${RET}" # string (w/o empty)
@@ -778,6 +786,9 @@ Network ()
db_set container/network1/ipv4-comment "${NETWORK1_IPV4_COMMENT}"
db_fset container/network1/ipv4-comment seen false
+ db_set container/network1/ipv4-address-dns "${NETWORK1_IPV4_ADDRESS_DNS}"
+ db_fset container/network1/ipv4-address-dns seen false
+
db_set container/network1/ipv4-address "${NETWORK1_IPV4_ADDRESS}"
db_fset container/network1/ipv4-address seen false
@@ -799,6 +810,9 @@ Network ()
db_set container/network1/ipv6-comment "${NETWORK1_IPV6_COMMENT}"
db_fset container/network1/ipv6-comment seen false
+ db_set container/network1/ipv6-address-dns "${NETWORK1_IPV6_ADDRESS_DNS}"
+ db_fset container/network1/ipv6-address-dns seen false
+
db_set container/network1/ipv6-address "${NETWORK1_IPV6_ADDRESS}"
db_fset container/network1/ipv6-address seen false
@@ -849,6 +863,10 @@ Network ()
db_go
db_settitle container/title
+ db_input high container/network1/ipv4-address-dns || true
+ db_go
+
+ db_settitle container/title
db_input high container/network1/ipv4-address || true
db_go
@@ -887,6 +905,10 @@ Network ()
db_go
db_settitle container/title
+ db_input high container/network1/ipv6-address-dns || true
+ db_go
+
+ db_settitle container/title
db_input high container/network1/ipv6-address || true
db_go
@@ -946,6 +968,11 @@ Network ()
eval NETWORK${NUMBER}_IPV4_METHOD="\"${RET}\"" # select
fi
+ if db_get container/network${NUMBER}/ipv4-address-dns
+ then
+ eval NETWORK${NUMBER}_IPV4_ADDRESS_DNS="\"${RET}\"" # string (w/ empty)
+ fi
+
if db_get container/network${NUMBER}/ipv4-address
then
eval NETWORK${NUMBER}_IPV4_ADDRESS="\"${RET}\"" # string (w/o empty)
@@ -984,6 +1011,11 @@ Network ()
eval NETWORK${NUMBER}_IPV6_METHOD="\"${RET}\"" # select
fi
+ if db_get container/network${NUMBER}/ipv6-address-dns
+ then
+ eval NETWORK${NUMBER}_IPV6_ADDRESS_DNS="\"${RET}\"" # string (w/ empty)
+ fi
+
if db_get container/network${NUMBER}/ipv6-address
then
eval NETWORK${NUMBER}_IPV6_ADDRESS="\"${RET}\"" # string (w/o empty)
@@ -1040,6 +1072,9 @@ Network ()
eval METHOD="$`echo NETWORK${NUMBER}_IPV4_METHOD`"
echo "NETWORK${NUMBER}_IPV4_METHOD=\"${METHOD}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ eval ADDRESS_DNS="$`echo NETWORK${NUMBER}_IPV4_ADDRESS_DNS`"
+ echo "NETWORK${NUMBER}_IPV4_ADDRESS_DNS=\"${ADDRESS_DNS}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+
eval ADDRESS="$`echo NETWORK${NUMBER}_IPV4_ADDRESS`"
echo "NETWORK${NUMBER}_IPV4_ADDRESS=\"${ADDRESS}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
@@ -1061,6 +1096,9 @@ Network ()
eval METHOD="$`echo NETWORK${NUMBER}_IPV6_METHOD`"
echo "NETWORK${NUMBER}_IPV6_METHOD=\"${METHOD}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ eval ADDRESS_DNS="$`echo NETWORK${NUMBER}_IPV6_ADDRESS_DNS`"
+ echo "NETWORK${NUMBER}_IPV6_ADDRESS_DNS=\"${ADDRESS_DNS}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+
eval ADDRESS="$`echo NETWORK${NUMBER}_IPV6_ADDRESS`"
echo "NETWORK${NUMBER}_IPV6_ADDRESS=\"${ADDRESS}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
diff --git a/share/build-scripts/debconf.d/0003-debconf.templates b/share/build-scripts/debconf.d/0003-debconf.templates
index 73952a8..73691ae 100644
--- a/share/build-scripts/debconf.d/0003-debconf.templates
+++ b/share/build-scripts/debconf.d/0003-debconf.templates
@@ -128,6 +128,14 @@ Description: Ethernet Interface Comment (IPv4)?
.
This defaults to empty.
+Template: container/network1/ipv4-address-dns
+Type: string
+Default:
+Description: IP Address from DNS (IPv4)?
+ Should the IP address automatically (based on the container name) derived from the DNS?
+ .
+ This defaults to empty.
+
Template: container/network1/ipv4-address
Type: string
Default:
@@ -188,6 +196,14 @@ Description: Ethernet Interface Comment (IPv6)?
.
This defaults to empty.
+Template: container/network1/ipv6-address-dns
+Type: string
+Default:
+Description: IP Address from DNS (IPv6)?
+ Should the IP address automatically (based on the container name) derived from the DNS?
+ .
+ This defaults to empty.
+
Template: container/network1/ipv6-address
Type: string
Default: