summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-network.sh
diff options
context:
space:
mode:
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