summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
Diffstat (limited to 'share/scripts/debconf')
-rwxr-xr-xshare/scripts/debconf8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 2edd543..619d84c 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -629,10 +629,18 @@ EOF
if [ -n "${DIG}" ]
then
IPV4_ADDRESS="$(${DIG} +short ${NAME} | tail -n1)"
+ IPV4_ADDRESS_PART1="$(echo ${IPV4_ADDRESS} | cut -d. -f1)"
+ IPV4_ADDRESS_PART2="$(echo ${IPV4_ADDRESS} | cut -d. -f2)"
+ IPV4_ADDRESS_PART3="$(echo ${IPV4_ADDRESS} | cut -d. -f3)"
+ IPV4_ADDRESS_PART4="$(echo ${IPV4_ADDRESS} | cut -d. -f4)"
fi
sed -e "s|@NAME@|${NAME}|g" \
-e "s|@IPV4_ADDRESS@|${IPV4_ADDRESS}|g" \
+ -e "s|@IPV4_ADDRESS_PART1@|${IPV4_ADDRESS_PART1}|g" \
+ -e "s|@IPV4_ADDRESS_PART2@|${IPV4_ADDRESS_PART2}|g" \
+ -e "s|@IPV4_ADDRESS_PART3@|${IPV4_ADDRESS_PART3}|g" \
+ -e "s|@IPV4_ADDRESS_PART4@|${IPV4_ADDRESS_PART4}|g" \
"${FILE}" >> "${DIRECTORY}/preseed.cfg"
done