Freedom is everything you need ; <moto-moi|afk> ik verkloot het gewoon nooit :P
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| #!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/net.eth0,v 1.3 2001/12/22 06:51:18 azarah Exp $
IFACE=${1##*.}
#IFACE should now be set to the name of the interface (grabbed from the name of
#this script)
#Configure the following settings:
IPNUM=192.168.1.7
BCAST=192.168.1.255
NMASK=255.255.255.0
NETWK=192.168.1.0
GTWAY=192.168.1.1
#You can also add additional network commands to the two functions below, such as
#firewall settings or additional routing commands.
start() {
ebegin "Bringing ${IFACE} up"
/sbin/ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK
[ $GTWAY ] && /sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1
#enabling rp_filter causes wacky packets to be auto-dropped by
#the kernel
if [ -e /proc/sys/net/ipv4/conf/${IFACE}/rp_filter ]
then
echo 1 > /proc/sys/net/ipv4/conf/${IFACE}/rp_filter
fi
eend
}
stop() {
ebegin "Bringing ${IFACE} down"
/sbin/ifconfig $IFACE down
eend
} |
dank je wel
Freedom is everything you need ; <moto-moi|afk> ik verkloot het gewoon nooit :P