summaryrefslogtreecommitdiff
path: root/src/core/procedures/base
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-28 17:56:00 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-28 17:56:00 +0100
commit25f7a0471340e8d6c2b37e3c75aa7d0ae209d09d (patch)
tree8a5c921946125e659df4adf4b2baf733c764d482 /src/core/procedures/base
parentfebffe7a9f6d7dd27eb7e382e11ea9fbda62bb26 (diff)
cleanup worker_auto_network() / target_configure_network() code
The only thing needed to know before calling target_configure_network() is whether $RUNTIME_DIR/aif-network-settings exists; if that exists, network setup has been run sucessfully and all values are known. It's up to target_configure_network() to source that, which means worker_auto_network() functions can become simpler. Also, variable name cleanup: s/S_DHCP/DHCP/
Diffstat (limited to 'src/core/procedures/base')
-rw-r--r--src/core/procedures/base9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/procedures/base b/src/core/procedures/base
index fbab6f7..dd05773 100644
--- a/src/core/procedures/base
+++ b/src/core/procedures/base
@@ -159,10 +159,11 @@ worker_install_packages ()
worker_auto_network ()
{
- [ "$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
- [ "$S_DHCP" != 1 -a "$S_DHCP" != 0 ] && return 0
- return 1
+ if [ -f $RUNTIME_DIR/aif-network-settings ]
+ then
+ target_configure_network || return $?
+ fi
+ return 0
}