summaryrefslogtreecommitdiff
path: root/src/core/procedures/interactive
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-08-01 21:32:02 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2009-08-01 21:32:02 +0200
commit985105effdc8c7d80ad9592cf13ff245e71ef826 (patch)
tree8bac18025a471535529d148d7b402169fee2d985 /src/core/procedures/interactive
parentc70a4c92c554ccca13edcb60b15e12af56d13f60 (diff)
ask to export network settings to target system just before configuring system, also track network settings possibly done in a separate process and misc cleanups/fixes
Diffstat (limited to 'src/core/procedures/interactive')
-rw-r--r--src/core/procedures/interactive27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive
index 2f492d9..784a33a 100644
--- a/src/core/procedures/interactive
+++ b/src/core/procedures/interactive
@@ -74,12 +74,12 @@ mainmenu()
"5")
check_depend worker package_list && \
check_depend worker select_source && execute worker install_packages && { execute worker auto_fstab ; \
- ended_ok worker runtime_network && execute worker auto_network ; \
execute worker auto_locale ; \
execute worker auto_keymap_font;
true ; } && NEXTITEM=6 ;;
"6")
- check_depend worker install_packages && execute worker configure_system && { execute worker mkinitcpio ; \
+ check_depend worker install_packages && execute worker auto_network && \
+ execute worker configure_system && { execute worker mkinitcpio ; \
execute worker locales ;
execute worker initialtime ;
true ; } && NEXTITEM=7 ;;
@@ -167,8 +167,23 @@ worker_install_bootloader ()
worker_auto_network ()
{
- 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"
- [ "$S_DHCP" != 1 ] && target_configure_network fixed "$PROXY_HTTP" "$PROXY_FTP"
+ 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 ]
+ 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
+ fi
}