diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-02-14 18:06:31 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-02-14 18:06:31 +0100 |
commit | 39e42a15a8e1c5ea1b4a61874de4f4834cb64e68 (patch) | |
tree | b30da9bc0c7fa22d9c6789e4cb15612497179b96 /src/core | |
parent | 9506a6b2359e9c1ca8b3da9e6f6528e2bda97803 (diff) |
port of FS#13237 - Copying manual network configuration to rc.conf
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/libs/lib-network.sh | 16 |
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 |