Break the lower level functions out to set a question's value or seen flag out as to ease the move away of preseed files and drop usage of OLDSYS_PRESEED_FILE from the testsuite.
Update the testsuite correspondingly, taking the occasion to separate fields with tab rather than spaces. Signed-off-by: Loïc Minier <l...@debian.org> --- functions | 26 ++++++++++++++++++-- tests/arm/dns323-dhcp.preseed | 16 ++++++------ tests/arm/dns323-static.preseed | 16 ++++++------ tests/arm/kuroboxpro_dhcp.preseed | 16 ++++++------ tests/arm/kuroboxpro_static.preseed | 16 ++++++------ tests/arm/lspro_dhcp.preseed | 16 ++++++------ tests/arm/lspro_static.preseed | 16 ++++++------ tests/arm/mv2120_dhcp.preseed | 14 +++++----- tests/arm/mv2120_static.preseed | 16 ++++++------ tests/arm/nslu2.preseed | 16 ++++++------ tests/arm/nslu2_invalid_hostname.preseed | 14 +++++----- tests/arm/nslu2_static.preseed | 16 ++++++------ tests/arm/nslu2_static_no_dns.preseed | 18 +++++++------- tests/arm/nslu2_static_no_gw.preseed | 16 ++++++------ tests/arm/nslu2_static_no_ip.preseed | 18 +++++++------- tests/arm/nslu2_uninitialized.preseed | 16 ++++++------ tests/arm/qnap_dhcp.preseed | 16 ++++++------ tests/arm/qnap_static.preseed | 16 ++++++------ tests/arm/qnap_static_unreachable_gateway.preseed | 18 +++++++------- tests/arm/thecus_dhcp.preseed | 16 ++++++------ tests/arm/thecus_static_not_default.preseed | 18 +++++++------- tests/do-test | 13 +++++++++- 22 files changed, 197 insertions(+), 166 deletions(-) diff --git a/functions b/functions index 9ac20e5..893da63 100644 --- a/functions +++ b/functions @@ -171,26 +171,46 @@ parse_sib_conf() { # Generating +# Set a debconf question to a value in the preseed file +# NB: debconf-set-selections will consider every question set in a preseed file +# as seen +# $1 = question +# $2 = type +# $3 = value +op_db_set() { + echo "d-i $1 $2 $3" | sed 's/ *$//' >> "$OLDSYS_PRESEED_FILE" +} + +# Set a debconf question as seen, but don't set its value +# NB: this relies on the special "seen" type as documented in the Debian +# Installation Guide, Automating the installation using preseeding, +# Advanced options, Using preseeding to change default values +# $1 = question +op_db_seen() { + op_db_set "$1" "seen" "true" +} + # Set a debconf question if it's a note or its value isn't empty # $1 = question # $2 = type # $3 = value add() { if [ -n "$3" -o "$2" = "note" ]; then - echo "d-i $1 $2 $3" | sed 's/ *$//' >> "$OLDSYS_PRESEED_FILE" + op_db_set "$1" "$2" "$3" fi } # Set a debconf question as seen if its value is empty and if we're in # non-interactive mode, otherwise set its value +# NB: doesn't handle the note type specially # $1 = question # $2 = type # $3 = value add_or_set_seen() { if [ -z "$3" -a "$NONINTERACTIVE" = "yes" ]; then - add "$1" "seen" "true" + op_db_seen "$1" else - add "$1" "$2" "$3" + op_db_set "$1" "$2" "$3" fi } diff --git a/tests/arm/dns323-dhcp.preseed b/tests/arm/dns323-dhcp.preseed index e7d4e44..0c90cb4 100644 --- a/tests/arm/dns323-dhcp.preseed +++ b/tests/arm/dns323-dhcp.preseed @@ -1,8 +1,8 @@ -d-i netcfg/choose_interface select eth0 -d-i netcfg/use_dhcp boolean true -d-i netcfg/dhcp_failed note -d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_ipaddress string 192.168.0.32 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.0.1 -d-i netcfg/get_nameservers string 192.168.0.254 192.168.0.255 +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/use_dhcp boolean true +op_db_set netcfg/dhcp_failed note +op_db_set netcfg/dhcp_options select Configure network manually +op_db_set netcfg/get_ipaddress string 192.168.0.32 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.0.1 +op_db_set netcfg/get_nameservers string 192.168.0.254 192.168.0.255 diff --git a/tests/arm/dns323-static.preseed b/tests/arm/dns323-static.preseed index ccaa401..036ad1a 100644 --- a/tests/arm/dns323-static.preseed +++ b/tests/arm/dns323-static.preseed @@ -1,8 +1,8 @@ -d-i netcfg/choose_interface select eth0 -d-i netcfg/get_ipaddress string 192.168.0.2 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.0.254 -d-i netcfg/get_nameservers string 192.168.0.254 192.168.0.255 -d-i netcfg/confirm_static boolean true -d-i netcfg/disable_dhcp boolean true -d-i netcfg/get_hostname string home +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/get_ipaddress string 192.168.0.2 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.0.254 +op_db_set netcfg/get_nameservers string 192.168.0.254 192.168.0.255 +op_db_set netcfg/confirm_static boolean true +op_db_set netcfg/disable_dhcp boolean true +op_db_set netcfg/get_hostname string home diff --git a/tests/arm/kuroboxpro_dhcp.preseed b/tests/arm/kuroboxpro_dhcp.preseed index 58f50e4..cf1bbfd 100644 --- a/tests/arm/kuroboxpro_dhcp.preseed +++ b/tests/arm/kuroboxpro_dhcp.preseed @@ -1,8 +1,8 @@ -d-i netcfg/dhcp_failed note -d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_ipaddress string 192.168.11.150 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.11.1 -d-i netcfg/get_nameservers string 83.255.249.10 83.255.245.10 -d-i netcfg/choose_interface select eth0 -d-i netcfg/use_dhcp boolean true +op_db_set netcfg/dhcp_failed note +op_db_set netcfg/dhcp_options select Configure network manually +op_db_set netcfg/get_ipaddress string 192.168.11.150 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.11.1 +op_db_set netcfg/get_nameservers string 83.255.249.10 83.255.245.10 +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/use_dhcp boolean true diff --git a/tests/arm/kuroboxpro_static.preseed b/tests/arm/kuroboxpro_static.preseed index 365553d..71ecfb9 100644 --- a/tests/arm/kuroboxpro_static.preseed +++ b/tests/arm/kuroboxpro_static.preseed @@ -1,8 +1,8 @@ -d-i netcfg/choose_interface select eth0 -d-i netcfg/get_ipaddress string 192.168.0.22 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.0.10 -d-i netcfg/get_nameservers string 192.168.0.10 -d-i netcfg/confirm_static boolean true -d-i netcfg/disable_dhcp boolean true -d-i netcfg/get_hostname string test +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/get_ipaddress string 192.168.0.22 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.0.10 +op_db_set netcfg/get_nameservers string 192.168.0.10 +op_db_set netcfg/confirm_static boolean true +op_db_set netcfg/disable_dhcp boolean true +op_db_set netcfg/get_hostname string test diff --git a/tests/arm/lspro_dhcp.preseed b/tests/arm/lspro_dhcp.preseed index 8e617d8..a6575ce 100644 --- a/tests/arm/lspro_dhcp.preseed +++ b/tests/arm/lspro_dhcp.preseed @@ -1,8 +1,8 @@ -d-i netcfg/dhcp_failed note -d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_ipaddress string 192.168.11.150 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.11.1 -d-i netcfg/get_nameservers string 192.168.1.1 -d-i netcfg/choose_interface select eth0 -d-i netcfg/use_dhcp boolean true +op_db_set netcfg/dhcp_failed note +op_db_set netcfg/dhcp_options select Configure network manually +op_db_set netcfg/get_ipaddress string 192.168.11.150 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.11.1 +op_db_set netcfg/get_nameservers string 192.168.1.1 +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/use_dhcp boolean true diff --git a/tests/arm/lspro_static.preseed b/tests/arm/lspro_static.preseed index 1f4ff55..a8c4ed1 100644 --- a/tests/arm/lspro_static.preseed +++ b/tests/arm/lspro_static.preseed @@ -1,8 +1,8 @@ -d-i netcfg/choose_interface select eth0 -d-i netcfg/get_ipaddress string 192.168.1.51 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.1 -d-i netcfg/get_nameservers string 192.168.1.1 -d-i netcfg/confirm_static boolean true -d-i netcfg/disable_dhcp boolean true -d-i netcfg/get_hostname string test +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/get_ipaddress string 192.168.1.51 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.1 +op_db_set netcfg/get_nameservers string 192.168.1.1 +op_db_set netcfg/confirm_static boolean true +op_db_set netcfg/disable_dhcp boolean true +op_db_set netcfg/get_hostname string test diff --git a/tests/arm/mv2120_dhcp.preseed b/tests/arm/mv2120_dhcp.preseed index c538508..e5aed13 100644 --- a/tests/arm/mv2120_dhcp.preseed +++ b/tests/arm/mv2120_dhcp.preseed @@ -1,7 +1,7 @@ -d-i netcfg/dhcp_failed note -d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_ipaddress string 192.168.1.100 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.1 -d-i netcfg/get_nameservers string 192.168.1.1 -d-i netcfg/use_dhcp boolean true +op_db_set netcfg/dhcp_failed note +op_db_set netcfg/dhcp_options select Configure network manually +op_db_set netcfg/get_ipaddress string 192.168.1.100 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.1 +op_db_set netcfg/get_nameservers string 192.168.1.1 +op_db_set netcfg/use_dhcp boolean true diff --git a/tests/arm/mv2120_static.preseed b/tests/arm/mv2120_static.preseed index 5711198..a2a028a 100644 --- a/tests/arm/mv2120_static.preseed +++ b/tests/arm/mv2120_static.preseed @@ -1,8 +1,8 @@ -d-i netcfg/get_ipaddress string 192.168.1.132 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.1 -d-i netcfg/get_nameservers string 195.3.96.69 192.168.1.1 -d-i netcfg/confirm_static boolean true -d-i netcfg/disable_dhcp boolean true -d-i netcfg/get_hostname string test -d-i netcfg/get_domain string cyrius.com +op_db_set netcfg/get_ipaddress string 192.168.1.132 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.1 +op_db_set netcfg/get_nameservers string 195.3.96.69 192.168.1.1 +op_db_set netcfg/confirm_static boolean true +op_db_set netcfg/disable_dhcp boolean true +op_db_set netcfg/get_hostname string test +op_db_set netcfg/get_domain string cyrius.com diff --git a/tests/arm/nslu2.preseed b/tests/arm/nslu2.preseed index 762a7e5..a66c313 100644 --- a/tests/arm/nslu2.preseed +++ b/tests/arm/nslu2.preseed @@ -1,8 +1,8 @@ -d-i netcfg/choose_interface select eth0 -d-i netcfg/get_ipaddress string 192.168.0.2 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.0.254 -d-i netcfg/get_nameservers string 192.168.0.254 192.168.0.255 192.168.0.259 -d-i netcfg/confirm_static boolean true -d-i netcfg/disable_dhcp boolean true -d-i netcfg/get_hostname string home +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/get_ipaddress string 192.168.0.2 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.0.254 +op_db_set netcfg/get_nameservers string 192.168.0.254 192.168.0.255 192.168.0.259 +op_db_set netcfg/confirm_static boolean true +op_db_set netcfg/disable_dhcp boolean true +op_db_set netcfg/get_hostname string home diff --git a/tests/arm/nslu2_invalid_hostname.preseed b/tests/arm/nslu2_invalid_hostname.preseed index bd07880..1a890a8 100644 --- a/tests/arm/nslu2_invalid_hostname.preseed +++ b/tests/arm/nslu2_invalid_hostname.preseed @@ -1,7 +1,7 @@ -d-i netcfg/choose_interface select eth0 -d-i netcfg/get_ipaddress string 192.168.0.2 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.0.254 -d-i netcfg/get_nameservers string 192.168.0.254 192.168.0.255 192.168.0.259 -d-i netcfg/confirm_static boolean true -d-i netcfg/disable_dhcp boolean true +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/get_ipaddress string 192.168.0.2 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.0.254 +op_db_set netcfg/get_nameservers string 192.168.0.254 192.168.0.255 192.168.0.259 +op_db_set netcfg/confirm_static boolean true +op_db_set netcfg/disable_dhcp boolean true diff --git a/tests/arm/nslu2_static.preseed b/tests/arm/nslu2_static.preseed index ae1c2e7..a334593 100644 --- a/tests/arm/nslu2_static.preseed +++ b/tests/arm/nslu2_static.preseed @@ -1,8 +1,8 @@ -d-i netcfg/choose_interface select eth0 -d-i netcfg/get_ipaddress string 192.168.1.77 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.1 -d-i netcfg/get_nameservers string 213.33.99.70 -d-i netcfg/confirm_static boolean true -d-i netcfg/disable_dhcp boolean true -d-i netcfg/get_hostname string foobar +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/get_ipaddress string 192.168.1.77 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.1 +op_db_set netcfg/get_nameservers string 213.33.99.70 +op_db_set netcfg/confirm_static boolean true +op_db_set netcfg/disable_dhcp boolean true +op_db_set netcfg/get_hostname string foobar diff --git a/tests/arm/nslu2_static_no_dns.preseed b/tests/arm/nslu2_static_no_dns.preseed index 7c4c128..7a0e17b 100644 --- a/tests/arm/nslu2_static_no_dns.preseed +++ b/tests/arm/nslu2_static_no_dns.preseed @@ -1,9 +1,9 @@ -d-i netcfg/dhcp_failed note -d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_ipaddress string 192.168.1.77 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.1 -d-i netcfg/get_nameservers string 192.168.1.1 -d-i netcfg/choose_interface select eth0 -d-i netcfg/use_dhcp boolean true -d-i netcfg/get_hostname string foobar +op_db_set netcfg/dhcp_failed note +op_db_set netcfg/dhcp_options select Configure network manually +op_db_set netcfg/get_ipaddress string 192.168.1.77 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.1 +op_db_set netcfg/get_nameservers string 192.168.1.1 +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/use_dhcp boolean true +op_db_set netcfg/get_hostname string foobar diff --git a/tests/arm/nslu2_static_no_gw.preseed b/tests/arm/nslu2_static_no_gw.preseed index 2116aa5..1aaaf38 100644 --- a/tests/arm/nslu2_static_no_gw.preseed +++ b/tests/arm/nslu2_static_no_gw.preseed @@ -1,8 +1,8 @@ -d-i netcfg/choose_interface select eth0 -d-i netcfg/get_ipaddress string 192.168.0.2 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string none -d-i netcfg/get_nameservers string 192.168.0.254 192.168.0.255 192.168.0.259 -d-i netcfg/confirm_static boolean true -d-i netcfg/disable_dhcp boolean true -d-i netcfg/get_hostname string home +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/get_ipaddress string 192.168.0.2 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string none +op_db_set netcfg/get_nameservers string 192.168.0.254 192.168.0.255 192.168.0.259 +op_db_set netcfg/confirm_static boolean true +op_db_set netcfg/disable_dhcp boolean true +op_db_set netcfg/get_hostname string home diff --git a/tests/arm/nslu2_static_no_ip.preseed b/tests/arm/nslu2_static_no_ip.preseed index 62cdacf..78b5002 100644 --- a/tests/arm/nslu2_static_no_ip.preseed +++ b/tests/arm/nslu2_static_no_ip.preseed @@ -1,9 +1,9 @@ -d-i netcfg/dhcp_failed note -d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_ipaddress string 192.168.1.77 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.1 -d-i netcfg/get_nameservers string 213.33.99.70 -d-i netcfg/choose_interface select eth0 -d-i netcfg/use_dhcp boolean true -d-i netcfg/get_hostname string foobar +op_db_set netcfg/dhcp_failed note +op_db_set netcfg/dhcp_options select Configure network manually +op_db_set netcfg/get_ipaddress string 192.168.1.77 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.1 +op_db_set netcfg/get_nameservers string 213.33.99.70 +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/use_dhcp boolean true +op_db_set netcfg/get_hostname string foobar diff --git a/tests/arm/nslu2_uninitialized.preseed b/tests/arm/nslu2_uninitialized.preseed index ab52e8c..cbdae2d 100644 --- a/tests/arm/nslu2_uninitialized.preseed +++ b/tests/arm/nslu2_uninitialized.preseed @@ -1,8 +1,8 @@ -d-i netcfg/dhcp_failed note -d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_ipaddress string 192.168.1.77 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.1 -d-i netcfg/get_nameservers string 192.168.1.1 -d-i netcfg/choose_interface select eth0 -d-i netcfg/use_dhcp boolean true +op_db_set netcfg/dhcp_failed note +op_db_set netcfg/dhcp_options select Configure network manually +op_db_set netcfg/get_ipaddress string 192.168.1.77 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.1 +op_db_set netcfg/get_nameservers string 192.168.1.1 +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/use_dhcp boolean true diff --git a/tests/arm/qnap_dhcp.preseed b/tests/arm/qnap_dhcp.preseed index d6c7828..0ba6025 100644 --- a/tests/arm/qnap_dhcp.preseed +++ b/tests/arm/qnap_dhcp.preseed @@ -1,8 +1,8 @@ -d-i netcfg/dhcp_failed note -d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_ipaddress string 192.168.1.100 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.1 -d-i netcfg/get_nameservers string 192.168.1.1 -d-i netcfg/choose_interface select eth0 -d-i netcfg/use_dhcp boolean true +op_db_set netcfg/dhcp_failed note +op_db_set netcfg/dhcp_options select Configure network manually +op_db_set netcfg/get_ipaddress string 192.168.1.100 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.1 +op_db_set netcfg/get_nameservers string 192.168.1.1 +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/use_dhcp boolean true diff --git a/tests/arm/qnap_static.preseed b/tests/arm/qnap_static.preseed index cffdd07..8c61544 100644 --- a/tests/arm/qnap_static.preseed +++ b/tests/arm/qnap_static.preseed @@ -1,8 +1,8 @@ -d-i netcfg/choose_interface select eth0 -d-i netcfg/get_ipaddress string 192.168.1.139 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.4 -d-i netcfg/get_nameservers string 213.33.99.70 -d-i netcfg/confirm_static boolean true -d-i netcfg/disable_dhcp boolean true -d-i netcfg/get_hostname string foobar +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/get_ipaddress string 192.168.1.139 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.4 +op_db_set netcfg/get_nameservers string 213.33.99.70 +op_db_set netcfg/confirm_static boolean true +op_db_set netcfg/disable_dhcp boolean true +op_db_set netcfg/get_hostname string foobar diff --git a/tests/arm/qnap_static_unreachable_gateway.preseed b/tests/arm/qnap_static_unreachable_gateway.preseed index 128daa3..6e7c75b 100644 --- a/tests/arm/qnap_static_unreachable_gateway.preseed +++ b/tests/arm/qnap_static_unreachable_gateway.preseed @@ -1,9 +1,9 @@ -d-i netcfg/dhcp_failed note -d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_ipaddress string 192.168.1.100 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.1 -d-i netcfg/get_nameservers string 213.33.99.70 -d-i netcfg/choose_interface select eth0 -d-i netcfg/use_dhcp boolean true -d-i netcfg/get_hostname string foobar +op_db_set netcfg/dhcp_failed note +op_db_set netcfg/dhcp_options select Configure network manually +op_db_set netcfg/get_ipaddress string 192.168.1.100 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.1 +op_db_set netcfg/get_nameservers string 213.33.99.70 +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/use_dhcp boolean true +op_db_set netcfg/get_hostname string foobar diff --git a/tests/arm/thecus_dhcp.preseed b/tests/arm/thecus_dhcp.preseed index d6c7828..0ba6025 100644 --- a/tests/arm/thecus_dhcp.preseed +++ b/tests/arm/thecus_dhcp.preseed @@ -1,8 +1,8 @@ -d-i netcfg/dhcp_failed note -d-i netcfg/dhcp_options select Configure network manually -d-i netcfg/get_ipaddress string 192.168.1.100 -d-i netcfg/get_netmask string 255.255.255.0 -d-i netcfg/get_gateway string 192.168.1.1 -d-i netcfg/get_nameservers string 192.168.1.1 -d-i netcfg/choose_interface select eth0 -d-i netcfg/use_dhcp boolean true +op_db_set netcfg/dhcp_failed note +op_db_set netcfg/dhcp_options select Configure network manually +op_db_set netcfg/get_ipaddress string 192.168.1.100 +op_db_set netcfg/get_netmask string 255.255.255.0 +op_db_set netcfg/get_gateway string 192.168.1.1 +op_db_set netcfg/get_nameservers string 192.168.1.1 +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/use_dhcp boolean true diff --git a/tests/arm/thecus_static_not_default.preseed b/tests/arm/thecus_static_not_default.preseed index e43255d..1cf1508 100644 --- a/tests/arm/thecus_static_not_default.preseed +++ b/tests/arm/thecus_static_not_default.preseed @@ -1,9 +1,9 @@ -d-i netcfg/choose_interface select eth0 -d-i netcfg/get_ipaddress string 192.168.0.100 -d-i netcfg/get_netmask string 255.255.0.0 -d-i netcfg/get_gateway string 192.168.0.1 -d-i netcfg/get_nameservers string 192.168.0.1 192.168.0.2 -d-i netcfg/confirm_static boolean true -d-i netcfg/disable_dhcp boolean true -d-i netcfg/get_hostname string n2100 -d-i netcfg/get_domain string daka.thg.se +op_db_set netcfg/choose_interface select eth0 +op_db_set netcfg/get_ipaddress string 192.168.0.100 +op_db_set netcfg/get_netmask string 255.255.0.0 +op_db_set netcfg/get_gateway string 192.168.0.1 +op_db_set netcfg/get_nameservers string 192.168.0.1 192.168.0.2 +op_db_set netcfg/confirm_static boolean true +op_db_set netcfg/disable_dhcp boolean true +op_db_set netcfg/get_hostname string n2100 +op_db_set netcfg/get_domain string daka.thg.se diff --git a/tests/do-test b/tests/do-test index cef8408..e5d9457 100755 --- a/tests/do-test +++ b/tests/do-test @@ -9,13 +9,24 @@ log() { fi } +log_preseed() { + (IFS=" "; echo "$*" >> "$OLDSYS_PRESEED_TEST_OUTPUT") +} + +op_db_set() { + log_preseed op_db_set "$@" +} + +op_db_seen() { + log_preseed op_db_seen "$@" +} + NONINTERACTIVE="yes" test="$1" DIR=$PWD TEST_DIR=$PWD/$(dirname "$test") OLDSYS_PRESEED_TEST_OUTPUT="$(tempfile)" -OLDSYS_PRESEED_FILE="$OLDSYS_PRESEED_TEST_OUTPUT" unset HOSTNAME . $test.test cd $DIR -- 1.7.5.4 -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1313532321-13642-5-git-send-email-l...@debian.org