blob: 53e9e6d0cd8ce0594605e390b3a8def6269c3346 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
Author: Daniel Baumann <daniel.baumann@progress-linux.org>
Description: Adding host variable for preseed files.
diff -Naurp open-infrastructure-compute-tools.orig/share/build-scripts/debconf open-infrastructure-compute-tools/share/build-scripts/debconf
--- open-infrastructure-compute-tools.orig/share/build-scripts/debconf
+++ open-infrastructure-compute-tools/share/build-scripts/debconf
@@ -123,6 +123,8 @@ then
exit 1
fi
+HOST="$(echo ${NAME} | cut -d. -f1)"
+
Mount ()
{
# Mounting rw bind mounts
@@ -686,6 +688,7 @@ EOF
sed -e "s|@FILE@|${FILE}|g" \
-e "s|@NAME@|${NAME}|g" \
+ -e "s|@HOST@|${HOST}|g" \
-e "s|@IPV4_ADDRESS1@|${IPV4_ADDRESS1}|g" \
-e "s|@IPV4_ADDRESS1_PART1@|${IPV4_ADDRESS1_PART1}|g" \
-e "s|@IPV4_ADDRESS1_PART2@|${IPV4_ADDRESS1_PART2}|g" \
@@ -1185,6 +1188,7 @@ trap 'Umount' EXIT HUP INT QUIT TERM
umask 0022
export NAME
+export HOST
Debconf
diff -Naurp open-infrastructure-compute-tools.orig/share/build-scripts/debconf.d/0002-preseed-debconf open-infrastructure-compute-tools/share/build-scripts/debconf.d/0002-preseed-debconf
--- open-infrastructure-compute-tools.orig/share/build-scripts/debconf.d/0002-preseed-debconf
+++ open-infrastructure-compute-tools/share/build-scripts/debconf.d/0002-preseed-debconf
@@ -93,6 +93,7 @@ do
fi
sed -e "s|@NAME@|${NAME}|g" \
+ -e "s|@HOST@|${HOST}|g" \
-e "s|@IPV4_ADDRESS1@|${IPV4_ADDRESS1}|g" \
-e "s|@IPV4_ADDRESS1_PART1@|${IPV4_ADDRESS1_PART1}|g" \
-e "s|@IPV4_ADDRESS1_PART2@|${IPV4_ADDRESS1_PART2}|g" \
|