summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf.d/0003-debconf
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf17
-rw-r--r--share/scripts/debconf.d/0003-debconf.templates6
2 files changed, 23 insertions, 0 deletions
diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf
index 1773b09..0eed489 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/scripts/debconf.d/0003-debconf
@@ -716,6 +716,9 @@ Network_defaults ()
Network ()
{
+ db_get cnt-debconf/network1/dnsname
+ NETWORK1_DNSNAME="${RET}" # string (w/ empty)
+
db_get cnt-debconf/network1/bridge
NETWORK1_BRIDGE="${RET}" # string (w/o empty)
@@ -757,6 +760,9 @@ Network ()
Network_defaults
+ db_set cnt-debconf/network1/dnsname "${NETWORK1_DNSNAME}"
+ db_fset cnt-debconf/network1/dnsname seen false
+
db_set cnt-debconf/network1/bridge "${NETWORK1_BRIDGE}"
db_fset cnt-debconf/network1/bridge seen false
@@ -800,6 +806,9 @@ Network ()
db_input high cnt-debconf/network1/ipv4-method || true
db_go
+ db_get cnt-debconf/network1/dnsname
+ NETWORK1_DNSNAME="${RET}" # string
+
db_get cnt-debconf/network1/bridge
NETWORK1_BRIDGE="${RET}" # select
@@ -848,6 +857,11 @@ Network ()
while db_get cnt-debconf/network${NUMBER}/ipv4-method && [ "${RET}" ]
do
+ if db_get cnt-debconf/network${NUMBER}/dnsname
+ then
+ eval NETWORK${NUMBER}_DNSNAME="\"${RET}\"" # string (w/ empty)
+ fi
+
if db_get cnt-debconf/network${NUMBER}/bridge
then
eval NETWORK${NUMBER}_BRIDGE="\"${RET}\"" # string (w/o empty)
@@ -916,6 +930,9 @@ Network ()
for NUMBER in $(seq 1 ${NETWORK_NUMBER})
do
+ eval DNSNAME="$`echo NETWORK${NUMBER}_DNSNAME`"
+ echo "NETWORK${NUMBER}_DNSNAME=\"${DNSNAME}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+
eval BRIDGE="$`echo NETWORK${NUMBER}_BRIDGE`"
echo "NETWORK${NUMBER}_BRIDGE=\"${BRIDGE}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
diff --git a/share/scripts/debconf.d/0003-debconf.templates b/share/scripts/debconf.d/0003-debconf.templates
index e3dbc24..96b5e7d 100644
--- a/share/scripts/debconf.d/0003-debconf.templates
+++ b/share/scripts/debconf.d/0003-debconf.templates
@@ -100,6 +100,12 @@ Default:
Description: Root password
Root password.
+Template: cnt-debconf/network1/dnsname
+Type: string
+Default:
+Description: DNS name.
+ DNS name.
+
Template: cnt-debconf/network1/bridge
Type: string
Default: