/[baselayout]/trunk/init.d/net.eth0-dhcp
Gentoo

Contents of /trunk/init.d/net.eth0-dhcp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (hide annotations) (download)
Tue Aug 21 04:58:04 2001 UTC (11 years, 9 months ago) by drobbins
File size: 664 byte(s)
fixums

1 drobbins 2 #!/sbin/runscript
2    
3 drobbins 14 IFACE=${1##*.}
4 drobbins 2 IFACE=${IFACE/-dhcp/}
5     #IFACE should now be equal to the name of the interface.
6     #(grabbed from script name)
7    
8     #You can also add additional network commands to the two functions below,
9     #such as firewall settings or additional routing commands.
10    
11     start() {
12     ebegin "Bringing ${IFACE} up using DHCP"
13     /sbin/dhcpcd $IFACE
14    
15     #enabling rp_filter causes wacky packets to be auto-dropped by
16     #the kernel
17     if [ -e /proc/sys/net/ipv4/conf/${IFACE}/rp_filter ]
18     then
19     echo 1 > /proc/sys/net/ipv4/conf/${IFACE}/rp_filter
20     fi
21     eend
22     }
23    
24     stop() {
25     ebegin "Bringing ${IFACE} down"
26     kill `cat /var/run/dhcpcd-${IFACE}.pid`
27     eend
28     }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.13