summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf.d
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-07-23 08:28:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-07-23 08:28:38 +0000
commit67dd59d5d9d8efb620ba8b65c7a661a8ae6a1365 (patch)
tree43300ba57e2427696d7d9b0b6ff14275d991f912 /share/scripts/debconf.d
parentAdding upstream version 20170701. (diff)
downloadopen-infrastructure-compute-tools-67dd59d5d9d8efb620ba8b65c7a661a8ae6a1365.tar.xz
open-infrastructure-compute-tools-67dd59d5d9d8efb620ba8b65c7a661a8ae6a1365.zip
Adding upstream version 20170722.upstream/20170722
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/scripts/debconf.d')
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf106
-rw-r--r--share/scripts/debconf.d/0003-debconf.templates30
2 files changed, 83 insertions, 53 deletions
diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf
index 8e78b3e..2592cf6 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/scripts/debconf.d/0003-debconf
@@ -23,6 +23,26 @@ export DEBCONF_NOWARNINGS
. /usr/share/debconf/confmodule
+Mode ()
+{
+ db_get cnt-debconf/mode
+ MODE="${RET}" # select
+
+ if [ -z "${MODE}" ]
+ then
+ MODE="$(basename ${SCRIPT})"
+
+ case "${MODE}" in
+ debconf)
+ MODE="debian"
+ ;;
+ esac
+ fi
+
+ echo "MODE=\"${MODE}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export MODE
+}
+
Distribution ()
{
db_get cnt-debconf/distribution
@@ -596,7 +616,7 @@ Packages ()
Local_archives ()
{
- NUMBER="0"
+ NUMBER="1"
while db_get cnt-debconf/archive${NUMBER}/repository && [ "${RET}" ]
do
@@ -674,10 +694,10 @@ Network_defaults ()
# * add support for bridges (make interface configuration more generic?)
HOSTNAME_SHORT="$(echo veth-$(echo ${NAME} | cut -c-8)-0)"
- VETH_NAME="$(echo ${HOSTNAME_SHORT:-veth0})"
+ VETH_NAME="${HOSTNAME_SHORT}"
NETWORK0_VETH="${NETWORK0_VETH:-$VETH_NAME}"
- NETWORK0_BRIDGE="${NETWORK0_BRIDGE:-br0}"
+ NETWORK0_BRIDGE="${NETWORK0_BRIDGE:-bridge0}"
NETWORK0_IPV4_METHOD="${NETWORK0_IPV4_METHOD:-dhcp}"
NETWORK0_IPV4_ADDRESS="${NETWORK0_IPV4_ADDRESS:-192.168.1.2}"
NETWORK0_IPV4_NETMASK="${NETWORK0_IPV4_NETMASK:-255.255.255.0}"
@@ -696,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
@@ -737,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
@@ -777,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
@@ -795,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
@@ -824,7 +844,7 @@ Network ()
;;
esac
- NUMBER="0"
+ NUMBER="1"
while db_get cnt-debconf/network${NUMBER}/ipv4-method && [ "${RET}" ]
do
@@ -894,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"
@@ -1044,6 +1064,8 @@ Internal_options ()
echo "CNT_OVERLAY=\"${CNT_OVERLAY}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
}
+Mode
+
Distribution
Parent_distribution
diff --git a/share/scripts/debconf.d/0003-debconf.templates b/share/scripts/debconf.d/0003-debconf.templates
index e46fa88..e3dbc24 100644
--- a/share/scripts/debconf.d/0003-debconf.templates
+++ b/share/scripts/debconf.d/0003-debconf.templates
@@ -2,6 +2,14 @@ Template: cnt-debconf/title
Type: title
Description: container-tools
+Template: cnt-debconf/mode
+Type: select
+Default:
+Choices-C: ${CHOICES_C}
+Choices: ${CHOICES}
+Description: Mode
+ Mode.
+
Template: cnt-debconf/distribution
Type: select
Default:
@@ -92,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:
@@ -114,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)?
@@ -122,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)?
@@ -130,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)?
@@ -138,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)?
@@ -146,19 +154,19 @@ 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)?
- What should be the post-up command for eth0?
+ What should be the post-up command for eno1?
.
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)?
- What should be the post-down command for eth0?
+ What should be the post-down command for eno1?
.
This defaults to empty.