summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-network.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-02-22 17:29:59 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2009-02-22 17:29:59 +0100
commit71f5510aaaa20ae5ae9c773dca12028bd96aafdf (patch)
treec3dee60f77a5c2954bf0a9a4e73befd0b916460e /src/core/libs/lib-network.sh
parentf9126402b343aea8f2766bc16c10577b833b6703 (diff)
parentf4bd7c36b44da0c9a5985868aa8b0183cd4414c8 (diff)
pull in a shitload of fixes and some features from the experimental branch
Diffstat (limited to 'src/core/libs/lib-network.sh')
-rw-r--r--src/core/libs/lib-network.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/libs/lib-network.sh b/src/core/libs/lib-network.sh
index ab91069..9ed96b2 100644
--- a/src/core/libs/lib-network.sh
+++ b/src/core/libs/lib-network.sh
@@ -13,18 +13,18 @@ target_configure_network()
PROXY_HTTP="$2"
PROXY_FTP="$3"
if [ "$1" = fixed ]; then
- sed -i "s#eth0=\"eth0#$INTERFACE=\"$INTERFACE#g" ${var_TARGET_DIR}/etc/rc.conf
- sed -i "s# 192.168.0.2 # $IPADDR #g" ${var_TARGET_DIR}/etc/rc.conf
- sed -i "s# 255.255.255.0 # $SUBNET #g" ${var_TARGET_DIR}/etc/rc.conf
- sed -i "s# 192.168.0.255\"# $BROADCAST\"#g" ${var_TARGET_DIR}/etc/rc.conf
- sed -i "s#eth0)#$INTERFACE)#g" ${var_TARGET_DIR}/etc/rc.conf
+ sed -i "s#eth0=\"eth0#$INTERFACE=\"$INTERFACE#g" ${var_TARGET_DIR}/etc/rc.conf
+ sed -i "s#$INTERFACE 192.168.0.2#$INTERFACE $IPADDR#g" ${var_TARGET_DIR}/etc/rc.conf
+ sed -i "s#netmask 255.255.255.0#netmask $SUBNET#g" ${var_TARGET_DIR}/etc/rc.conf
+ sed -i "s#broadcast 192.168.0.255#broadcast $BROADCAST#g" ${var_TARGET_DIR}/etc/rc.conf
+ sed -i "s#INTERFACES=(eth0)#INTERFACES=($INTERFACE)#g" ${var_TARGET_DIR}/etc/rc.conf
if [ "$GW" != "" ]; then
- sed -i "s#gw 192.168.0.1#gw $GW#g" ${var_TARGET_DIR}/etc/rc.conf
- sed -i "s#!gateway#gateway#g" ${var_TARGET_DIR}/etc/rc.conf
+ sed -i "s#gw 192.168.0.1#gw $GW#g" ${var_TARGET_DIR}/etc/rc.conf
+ sed -i "s#!gateway#gateway#g" ${var_TARGET_DIR}/etc/rc.conf
fi
echo "nameserver $DNS" >> ${var_TARGET_DIR}/etc/resolv.conf
else
- sed -i "s#eth0=\"eth0.*#$INTERFACE=\"dhcp\"#g" ${var_TARGET_DIR}/etc/rc.conf
+ sed -i "s#eth0=\"eth0.*#$INTERFACE=\"dhcp\"#g" ${var_TARGET_DIR}/etc/rc.conf
fi
if [ "$PROXY_HTTP" != "" ]; then