[Runnix-commits] SF.net SVN: runnix:[140] branches/0.3/target/generic/target_skeleton/runnix
Status: Alpha
Brought to you by:
krisk84
From: <abe...@us...> - 2010-12-18 19:36:32
|
Revision: 140 http://runnix.svn.sourceforge.net/runnix/?rev=140&view=rev Author: abelbeck Date: 2010-12-18 19:36:26 +0000 (Sat, 18 Dec 2010) Log Message: ----------- /runnix script, network, fix static IP config and cleanup Modified Paths: -------------- branches/0.3/target/generic/target_skeleton/runnix Modified: branches/0.3/target/generic/target_skeleton/runnix =================================================================== --- branches/0.3/target/generic/target_skeleton/runnix 2010-12-17 21:54:04 UTC (rev 139) +++ branches/0.3/target/generic/target_skeleton/runnix 2010-12-18 19:36:26 UTC (rev 140) @@ -35,10 +35,13 @@ if [ "$IP" = "dhcp" ]; then echo "Configuring $NDEV with DHCP..." udhcpc -nq -s /etc/udhcpc.script -i "$NDEV" - else - ifconfig "$NDEV" inet "$IP" netmask "$NM" - route add -net default gw "$GW" + elif [ -n "$IP" -a -n "$NM" ]; then + ifconfig "$NDEV" "$IP" netmask "$NM" + if [ -n "$GW" ]; then + route add -net default gw "$GW" dev "$NDEV" + fi + for i in $DNS; do echo "nameserver $i" >> /tmp/etc/resolv.conf done @@ -63,19 +66,6 @@ dropbearkey -t rsa -f /tmp/rsa_key -s 1024 dropbearkey -t dss -f /tmp/dss_key -s 1024 - if [ -n "$FAILIP" -a -n "$FAILNM" -a -n "$FAILDEV" ]; then - ifconfig $FAILDEV $FAILIP netmask $FAILNM - - if [ -n "$FAILGW" ]; then - route del -net default 2>/dev/null - route add -net default gw $FAILGW - fi - - SSHIP="$FAILIP" - else - SSHIP="$EXTIP" - fi - touch /var/log/lastlog touch /var/log/wtmp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |