summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf.d/0002-preseed-debconf
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-03-19 19:57:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-03-19 19:57:19 +0000
commita52f6a2a7cc32326dca1aaae098ded5f39271b6e (patch)
tree07d3717fb822b102cb87dd19fd308a0bacfbf591 /share/scripts/debconf.d/0002-preseed-debconf
parentAdding upstream version 20190304. (diff)
downloadopen-infrastructure-compute-tools-a52f6a2a7cc32326dca1aaae098ded5f39271b6e.tar.xz
open-infrastructure-compute-tools-a52f6a2a7cc32326dca1aaae098ded5f39271b6e.zip
Adding upstream version 20190319.upstream/20190319
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/scripts/debconf.d/0002-preseed-debconf')
-rwxr-xr-xshare/scripts/debconf.d/0002-preseed-debconf5
1 files changed, 4 insertions, 1 deletions
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