/[mdap]/network-setup.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /network-setup.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by dpavlin, Sun Apr 22 11:46:47 2007 UTC revision 62 by dpavlin, Sat Nov 17 00:12:12 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3  sudo ifconfig ath0 down  if=eth1
4  #sudo dhclient eth0  
5  sudo ifconfig eth0 down  echo "setting network on $if"
6    #sudo ifconfig $if down || exit
7    sudo killall udhcpd
8    sudo rm etc/udhcpd.leases
9    sudo touch etc/udhcpd.leases
10  sleep 1  sleep 1
11  sudo ifconfig eth0 192.168.1.100 up  sudo ifconfig $if 10.0.0.100 up
12  sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0  #sudo ifconfig $if:192 192.168.1.241 netmask 255.255.255.240 up
13  echo "leaving"  sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev $if
 sudo smcroute -l eth0 224.0.0.103  
 echo "joining"  
 sudo smcroute -j eth0 224.0.0.103  
14  netstat -rn  netstat -rn
15    pid=`pidof dhcpd`
16    if [ -z "$pid" ] ; then
17            echo "starting bootp server"
18            sudo /usr/sbin/udhcpd etc/udhcpd.conf
19    fi
20    echo "starting tftp server"
21    pid=`pidof in.tftpd`
22    test ! -z "$pid" && sudo kill $pid
23    sudo /usr/sbin/in.tftpd -l -a 10.0.0.100 -s /srv/tftp -B 1468 -v -v

Legend:
Removed from v.1  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.26