-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdlr.sh
More file actions
52 lines (38 loc) · 838 Bytes
/
Copy pathdlr.sh
File metadata and controls
52 lines (38 loc) · 838 Bytes
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
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
start(){
fw_setenv eth1_ports 3
fw_setenv eth1_proto dlr
fw_setenv eth1_vlan 0x7e
fw_setenv eth2_vlan 0x7f
fw_setenv multi_dev 1
fw_setenv stp 0
fw_setenv ipaddr 192.168.1.1
/etc/init.d/rcK
/etc/init.d/rcS
# Start the DLR supervisor
# If this switch is not the supervisor, remove the command below
echo 3 > /sys/class/net/eth0/dlrfs/node
}
stop(){
fw_setenv eth1_ports
fw_setenv eth1_proto
fw_setenv eth1_vlan
fw_setenv eth2_vlan
fw_setenv multi_dev 0
fw_setenv stp 0
/etc/init.d/rcK
/etc/init.d/rcS
}
case $1 in
start)
start
;;
stop)
stop
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit $?