diff options
Diffstat (limited to 'src/core/procedures/interactive')
-rw-r--r-- | src/core/procedures/interactive | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive index 5ee8cd7..03b9c1a 100644 --- a/src/core/procedures/interactive +++ b/src/core/procedures/interactive @@ -177,25 +177,18 @@ worker_install_bootloader () worker_auto_network () { - ask=0 - # if the user has been through networking setup and if any of these variables is set, it may be useful to export the users' choices to the target system - if [ "$S_DHCP" = 1 -o "$S_DHCP" = 0 ] && [ -n "$PROXY_HTTP$PROXY_FTP$DNS$INTERFACE$SUBNET$GW$BROADCAST" ] - then - ask=1 - # if the variables are not set but the network settings file exists, the user has probably run the runtime_network in a separate process (eg partial-configure-network) - # in that case, lets source the file and check again - elif [ -f $RUNTIME_DIR/aif-network-settings ] && source $RUNTIME_DIR/aif-network-settings && [ "$S_DHCP" = 1 -o "$S_DHCP" = 0 ] && [ -n "$PROXY_HTTP$PROXY_FTP$DNS$INTERFACE$SUBNET$GW$BROADCAST" ] - then - ask=1 - fi - if [ "$ask" = 1 ] + # if the user has been through networking setup, it may be useful to export the users' choices to the target system + # networking setup could have happened in a separate process (eg partial-configure-network), so check if the settings file was created to be sure + if [ -f $RUNTIME_DIR/aif-network-settings ] then ask_yesno "Do you want to use the network settings from the installer in rc.conf and resolv.conf?\n\nIf you used Proxy settings, they will be written to /etc/profile.d/proxy.sh" || return 0 - [ "$S_DHCP" = 1 ] && target_configure_network dhcp "$PROXY_HTTP" "$PROXY_FTP" && return 0 - [ "$S_DHCP" = 0 ] && target_configure_network fixed "$PROXY_HTTP" "$PROXY_FTP" && return 0 - show_warning "Automatic network settings propagation failed" "Failed to import current network settings into target system" - return 1 + if ! target_configure_network + then + show_warning "Automatic network settings propagation failed" "Failed to import current network settings into target system" + return 1 + fi fi + return 0 } worker_abort_installer () |