summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-ui-interactive.sh
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/libs/lib-ui-interactive.sh
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/libs/lib-ui-interactive.sh')
-rw-r--r--src/core/libs/lib-ui-interactive.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index b8cad71..e0b7ac8 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -784,15 +784,11 @@ interactive_runtime_network() {
local ifaces
ifaces=$(ifconfig -a |grep "Link encap:Ethernet"|sed 's/ \+Link encap:Ethernet \+HWaddr \+/ /g')
- if [ "$ifaces" = "" ]; then
- notify "Cannot find any ethernet interfaces. This usually means udev was\nunable to load the module and you must do it yourself. Switch to\nanother VT, load the appropriate module, and run this step again."
- return 1
- fi
+ [ -z "$ifaces" ] && show_warning "No network interfaces?" "Cannot find any ethernet interfaces. This usually means udev was\nunable to load the module and you must do it yourself. Switch to\nanother VT, load the appropriate module, and run this step again." && return 1
- ask_option no "Interface selection" "Select a network interface" required $ifaces || return 1 #TODO: code used originaly --nocancel here. what's the use? + make ok button 'select'
+ ask_option no "Interface selection" "Select a network interface" required $ifaces || return 1
INTERFACE=$ANSWER_OPTION
-
if ask_yesno "Do you want to use DHCP?"
then
infofy "Please wait. Polling for DHCP server on $INTERFACE..."
@@ -809,6 +805,7 @@ interactive_runtime_network() {
fi
S_DHCP=1
else
+ S_DHCP=0
NETPARAMETERS=""
while [ "$NETPARAMETERS" = "" ]; do
ask_string "Enter your IP address" "192.168.0.2" || return 1
@@ -854,6 +851,15 @@ interactive_runtime_network() {
fi
echo "nameserver $DNS" >/etc/resolv.conf
fi
+ echo "INTERFACE=$INTERFACE
+ S_DHCP=$S_DHCP
+ IPADDR=$IPADDR
+ SUBNET=$SUBNET
+ BROADCAST=$BROADCAST
+ GW=$GW
+ DNS=$DNS
+ PROXY_HTTP=$PROXY_HTTP
+ PROXY_FTP=$PROXY_FTP" > $RUNTIME_DIR/aif-network-settings
notify "The network is configured."
return 0
}