summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2017-07-22 22:48:02 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2017-07-23 08:20:54 +0000
commitef3cb84bcb666b377039352a925b1947e3beff00 (patch)
treea18856e7922ceb9309a183ae980c6a53d6ea373a
parentMaking example preseed files non-interactive. (diff)
downloadcompute-tools-ef3cb84bcb666b377039352a925b1947e3beff00.tar.xz
compute-tools-ef3cb84bcb666b377039352a925b1947e3beff00.zip
Starting to count at 1 instead of 0 to be consistent with new network interface names in network and archive preseeding arrays.
old: container-tools cnt-debconf/archive0/... new: container-tools cnt-debconf/archive1/... old: container-tools cnt-debconf/network0/... new: container-tools cnt-debconf/network1/... Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rw-r--r--share/doc/examples/dschinn-backports.cfg34
-rw-r--r--share/doc/examples/stretch.cfg2
-rwxr-xr-xshare/scripts/debconf2
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf80
-rw-r--r--share/scripts/debconf.d/0003-debconf.templates18
5 files changed, 68 insertions, 68 deletions
diff --git a/share/doc/examples/dschinn-backports.cfg b/share/doc/examples/dschinn-backports.cfg
index 0ecee00..4f72268 100644
--- a/share/doc/examples/dschinn-backports.cfg
+++ b/share/doc/examples/dschinn-backports.cfg
@@ -34,15 +34,15 @@ container-tools cnt-debconf/root-password string progress
#container-tools cnt-debconf/root-password-crypted string
# Network IP configuration
-container-tools cnt-debconf/network0/bridge string bridge0
-container-tools cnt-debconf/network0/veth string veth0
-container-tools cnt-debconf/network0/ipv4-method select static
-container-tools cnt-debconf/network0/ipv4-comment string Primary network interfaces
-container-tools cnt-debconf/network0/ipv4-address string 192.168.0.2
-container-tools cnt-debconf/network0/ipv4-gateway string 192.168.0.1
-container-tools cnt-debconf/network0/ipv4-netmask string 255.255.255.0
-#container-tools cnt-debconf/network0/ipv4-post-up string
-#container-tools cnt-debconf/network0/ipv4-post-down string
+container-tools cnt-debconf/network1/bridge string bridge0
+container-tools cnt-debconf/network1/veth string veth0
+container-tools cnt-debconf/network1/ipv4-method select static
+container-tools cnt-debconf/network1/ipv4-comment string Primary network interfaces
+container-tools cnt-debconf/network1/ipv4-address string 192.168.0.2
+container-tools cnt-debconf/network1/ipv4-gateway string 192.168.0.1
+container-tools cnt-debconf/network1/ipv4-netmask string 255.255.255.0
+#container-tools cnt-debconf/network1/ipv4-post-up string
+#container-tools cnt-debconf/network1/ipv4-post-down string
# Network DNS configuration
container-tools cnt-debconf/nameserver/server string 127.0.0.1 8.8.8.8 8.8.4.4
@@ -51,14 +51,14 @@ container-tools cnt-debconf/nameserver/search string example.net
container-tools cnt-debconf/nameserver/options string timeout:1 attempts:1
# Third-Party Repositories
-#container-tools cnt-debconf/archive0/repository string
-#container-tools cnt-debconf/archive0/list string
-#container-tools cnt-debconf/archive0/comment string
-#container-tools cnt-debconf/archive0/source string
-#container-tools cnt-debconf/archive0/key string
-#container-tools cnt-debconf/archive0/preferences-package string
-#container-tools cnt-debconf/archive0/preferences-pin string
-#container-tools cnt-debconf/archive0/preferences-pin-priority
+#container-tools cnt-debconf/archive1/repository string
+#container-tools cnt-debconf/archive1/list string
+#container-tools cnt-debconf/archive1/comment string
+#container-tools cnt-debconf/archive1/source string
+#container-tools cnt-debconf/archive1/key string
+#container-tools cnt-debconf/archive1/preferences-package string
+#container-tools cnt-debconf/archive1/preferences-pin string
+#container-tools cnt-debconf/archive1/preferences-pin-priority
# Internal Options
#container-tools cnt-debconf/apt-recommends string
diff --git a/share/doc/examples/stretch.cfg b/share/doc/examples/stretch.cfg
index 92d4f02..4a137b7 100644
--- a/share/doc/examples/stretch.cfg
+++ b/share/doc/examples/stretch.cfg
@@ -33,5 +33,5 @@ container-tools cnt-debconf/packages string openssh-server
container-tools cnt-debconf/root-password string debian
#container-tools cnt-debconf/root-password-crypted string
-container-tools cnt-debconf/network0/bridge string bridge0
+container-tools cnt-debconf/network1/bridge string bridge0
#container-tools cnt-debconf/network-mac string
diff --git a/share/scripts/debconf b/share/scripts/debconf
index a31c605..6190c31 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -810,7 +810,7 @@ Configure_systemd_networkd ()
chroot "${DIRECTORY}" systemctl enable systemd-networkd
- for NUMBER in $(seq 0 ${NETWORK_NUMBER})
+ for NUMBER in $(seq 1 ${NETWORK_NUMBER})
do
eval IPV4_COMMENT="$`echo NETWORK${NUMBER}_IPV4_COMMENT`"
eval IPV4_METHOD="$`echo NETWORK${NUMBER}_IPV4_METHOD`"
diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf
index 23266f0..2592cf6 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/scripts/debconf.d/0003-debconf
@@ -616,7 +616,7 @@ Packages ()
Local_archives ()
{
- NUMBER="0"
+ NUMBER="1"
while db_get cnt-debconf/archive${NUMBER}/repository && [ "${RET}" ]
do
@@ -716,31 +716,31 @@ Network_defaults ()
Network ()
{
- db_get cnt-debconf/network0/bridge
+ db_get cnt-debconf/network1/bridge
NETWORK0_BRIDGE="${RET}" # string (w/o empty)
- db_get cnt-debconf/network0/veth
+ db_get cnt-debconf/network1/veth
NETWORK0_VETH="${RET}" # string (w/o empty)
- db_get cnt-debconf/network0/ipv4-method
+ db_get cnt-debconf/network1/ipv4-method
NETWORK0_IPV4_METHOD="${RET}" # select
- db_get cnt-debconf/network0/ipv4-comment
+ db_get cnt-debconf/network1/ipv4-comment
NETWORK0_IPV4_COMMENT="${RET}" # string (w/ empty)
- db_get cnt-debconf/network0/ipv4-address
+ db_get cnt-debconf/network1/ipv4-address
NETWORK0_IPV4_ADDRESS="${RET}" # string (w/o empty)
- db_get cnt-debconf/network0/ipv4-gateway
+ db_get cnt-debconf/network1/ipv4-gateway
NETWORK0_IPV4_GATEWAY="${RET}" # string (w/ empty)
- db_get cnt-debconf/network0/ipv4-netmask
+ db_get cnt-debconf/network1/ipv4-netmask
NETWORK0_IPV4_NETMASK="${RET}" # string (w/o empty)
- db_get cnt-debconf/network0/ipv4-post-up
+ db_get cnt-debconf/network1/ipv4-post-up
NETWORK0_IPV4_POST_UP="${RET}" # string (w/ empty)
- db_get cnt-debconf/network0/ipv4-post-down
+ db_get cnt-debconf/network1/ipv4-post-down
NETWORK0_IPV4_POST_DOWN="${RET}" # string (w/ empty)
db_get cnt-debconf/nameserver/server
@@ -757,32 +757,32 @@ Network ()
Network_defaults
- db_set cnt-debconf/network0/bridge "${NETWORK0_BRIDGE}"
- db_fset cnt-debconf/network0/bridge seen false
+ db_set cnt-debconf/network1/bridge "${NETWORK0_BRIDGE}"
+ db_fset cnt-debconf/network1/bridge seen false
- db_set cnt-debconf/network0/veth "${NETWORK0_VETH}"
- db_fset cnt-debconf/network0/veth seen false
+ db_set cnt-debconf/network1/veth "${NETWORK0_VETH}"
+ db_fset cnt-debconf/network1/veth seen false
- db_set cnt-debconf/network0/ipv4-method "${NETWORK0_IPV4_METHOD}"
- db_fset cnt-debconf/network0/ipv4-method seen false
+ db_set cnt-debconf/network1/ipv4-method "${NETWORK0_IPV4_METHOD}"
+ db_fset cnt-debconf/network1/ipv4-method seen false
- db_set cnt-debconf/network0/ipv4-comment "${NETWORK0_IPV4_COMMENT}"
- db_fset cnt-debconf/network0/ipv4-comment seen false
+ db_set cnt-debconf/network1/ipv4-comment "${NETWORK0_IPV4_COMMENT}"
+ db_fset cnt-debconf/network1/ipv4-comment seen false
- db_set cnt-debconf/network0/ipv4-address "${NETWORK0_IPV4_ADDRESS}"
- db_fset cnt-debconf/network0/ipv4-address seen false
+ db_set cnt-debconf/network1/ipv4-address "${NETWORK0_IPV4_ADDRESS}"
+ db_fset cnt-debconf/network1/ipv4-address seen false
- db_set cnt-debconf/network0/ipv4-gateway "${NETWORK0_IPV4_GATEWAY}"
- db_fset cnt-debconf/network0/ipv4-gateway seen false
+ db_set cnt-debconf/network1/ipv4-gateway "${NETWORK0_IPV4_GATEWAY}"
+ db_fset cnt-debconf/network1/ipv4-gateway seen false
- db_set cnt-debconf/network0/ipv4-netmask "${NETWORK0_IPV4_NETMASK}"
- db_fset cnt-debconf/network0/ipv4-netmask seen false
+ db_set cnt-debconf/network1/ipv4-netmask "${NETWORK0_IPV4_NETMASK}"
+ db_fset cnt-debconf/network1/ipv4-netmask seen false
- db_set cnt-debconf/network0/ipv4-post-up "${NETWORK0_IPV4_POST_UP}"
- db_fset cnt-debconf/network0/ipv4-post-up seen false
+ db_set cnt-debconf/network1/ipv4-post-up "${NETWORK0_IPV4_POST_UP}"
+ db_fset cnt-debconf/network1/ipv4-post-up seen false
- db_set cnt-debconf/network0/ipv4-post-down "${NETWORK0_IPV4_POST_DOWN}"
- db_fset cnt-debconf/network0/ipv4-post-down seen false
+ db_set cnt-debconf/network1/ipv4-post-down "${NETWORK0_IPV4_POST_DOWN}"
+ db_fset cnt-debconf/network1/ipv4-post-down seen false
db_set cnt-debconf/nameserver/server "${NAMESERVER_SERVER}"
db_fset cnt-debconf/nameserver/server seen false
@@ -797,16 +797,16 @@ Network ()
db_fset cnt-debconf/nameserver/options seen false
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-method || true
+ db_input high cnt-debconf/network1/ipv4-method || true
db_go
- db_get cnt-debconf/network0/bridge
+ db_get cnt-debconf/network1/bridge
NETWORK0_BRIDGE="${RET}" # select
- db_get cnt-debconf/network0/veth
+ db_get cnt-debconf/network1/veth
NETWORK0_VETH="${RET}" # select
- db_get cnt-debconf/network0/ipv4-method
+ db_get cnt-debconf/network1/ipv4-method
NETWORK0_IPV4_METHOD="${RET}" # select
case "${NETWORK0_IPV4_METHOD}" in
@@ -815,27 +815,27 @@ Network ()
static)
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-comment || true
+ db_input high cnt-debconf/network1/ipv4-comment || true
db_go
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-address || true
+ db_input high cnt-debconf/network1/ipv4-address || true
db_go
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-gateway || true
+ db_input high cnt-debconf/network1/ipv4-gateway || true
db_go
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-netmask || true
+ db_input high cnt-debconf/network1/ipv4-netmask || true
db_go
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-post-up || true
+ db_input high cnt-debconf/network1/ipv4-post-up || true
db_go
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-post-down || true
+ db_input high cnt-debconf/network1/ipv4-post-down || true
db_go
db_settitle cnt-debconf/title
@@ -844,7 +844,7 @@ Network ()
;;
esac
- NUMBER="0"
+ NUMBER="1"
while db_get cnt-debconf/network${NUMBER}/ipv4-method && [ "${RET}" ]
do
@@ -914,7 +914,7 @@ Network ()
echo "NETWORK_NUMBER=\"${NETWORK_NUMBER}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
- for NUMBER in $(seq 0 ${NETWORK_NUMBER})
+ for NUMBER in $(seq 1 ${NETWORK_NUMBER})
do
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 f091f47..e3dbc24 100644
--- a/share/scripts/debconf.d/0003-debconf.templates
+++ b/share/scripts/debconf.d/0003-debconf.templates
@@ -100,19 +100,19 @@ Default:
Description: Root password
Root password.
-Template: cnt-debconf/network0/bridge
+Template: cnt-debconf/network1/bridge
Type: string
Default:
Description: Bridge
Bridge.
-Template: cnt-debconf/network0/veth
+Template: cnt-debconf/network1/veth
Type: string
Default:
Description: Veth name
Veth name.
-Template: cnt-debconf/network0/ipv4-method
+Template: cnt-debconf/network1/ipv4-method
Type: select
Choices: dhcp, static, none
Default:
@@ -122,7 +122,7 @@ Description: Ethernet Interface Method (IPv4)?
This defaults to dhcp and will require that you run a dhcp-server in your
network.
-Template: cnt-debconf/network0/ipv4-comment
+Template: cnt-debconf/network1/ipv4-comment
Type: string
Default:
Description: Ethernet Interface Comment (IPv4)?
@@ -130,7 +130,7 @@ Description: Ethernet Interface Comment (IPv4)?
.
This defaults to empty.
-Template: cnt-debconf/network0/ipv4-address
+Template: cnt-debconf/network1/ipv4-address
Type: string
Default:
Description: Ethernet IP Address (IPv4)?
@@ -138,7 +138,7 @@ Description: Ethernet IP Address (IPv4)?
.
This defaults to 192.168.1.2.
-Template: cnt-debconf/network0/ipv4-gateway
+Template: cnt-debconf/network1/ipv4-gateway
Type: string
Default:
Description: Ethernet Gateway Address (IPv4)?
@@ -146,7 +146,7 @@ Description: Ethernet Gateway Address (IPv4)?
.
This defaults to empty.
-Template: cnt-debconf/network0/ipv4-netmask
+Template: cnt-debconf/network1/ipv4-netmask
Type: string
Default:
Description: Ethernet Network Mask (IPv4)?
@@ -154,7 +154,7 @@ Description: Ethernet Network Mask (IPv4)?
.
This defaults to empty.
-Template: cnt-debconf/network0/ipv4-post-up
+Template: cnt-debconf/network1/ipv4-post-up
Type: string
Default:
Description: Ethernet post-up Command (IPv4)?
@@ -162,7 +162,7 @@ Description: Ethernet post-up Command (IPv4)?
.
This defaults to empty.
-Template: cnt-debconf/network0/ipv4-post-down
+Template: cnt-debconf/network1/ipv4-post-down
Type: string
Default:
Description: Ethernet post-down Command (IPv4)?