/[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

Annotation of /network-setup.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 84 - (hide annotations)
Wed Dec 5 22:53:21 2007 UTC (11 years, 11 months ago) by dpavlin
File MIME type: application/x-sh
File size: 619 byte(s)
accept interface as argument
1 dpavlin 1 #!/bin/sh
2    
3 dpavlin 42 if=eth1
4 dpavlin 84 test ! -z "$1" && if=$1
5 dpavlin 42
6     echo "setting network on $if"
7 dpavlin 44 #sudo ifconfig $if down || exit
8 dpavlin 42 sudo killall udhcpd
9     sudo rm etc/udhcpd.leases
10     sudo touch etc/udhcpd.leases
11 dpavlin 1 sleep 1
12 dpavlin 54 sudo ifconfig $if 10.0.0.100 up
13 dpavlin 48 #sudo ifconfig $if:192 192.168.1.241 netmask 255.255.255.240 up
14 dpavlin 42 sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev $if
15 dpavlin 1 netstat -rn
16 dpavlin 60 pid=`pidof dhcpd`
17     if [ -z "$pid" ] ; then
18     echo "starting bootp server"
19     sudo /usr/sbin/udhcpd etc/udhcpd.conf
20     fi
21 dpavlin 42 echo "starting tftp server"
22 dpavlin 48 pid=`pidof in.tftpd`
23     test ! -z "$pid" && sudo kill $pid
24 dpavlin 62 sudo /usr/sbin/in.tftpd -l -a 10.0.0.100 -s /srv/tftp -B 1468 -v -v

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26