[riot-notifications] [RIOT] native: unify and simplify usage of tapsetup script (#3182)

Ludwig Ortmann notifications at github.com
Sat Jun 13 15:44:53 CEST 2015


this PR:
```
+ basename ./cpu/native/tapsetup
+ PROGRAM=tapsetup
+ COUNT=2
+ COMMAND=''
+ BRNAME=tapbr0
+ TAPNAME=tap
+ DEACTIVATE_IPV6=''
+ true
+ BRNAME=bridge0
+ shift 2
+ true
+ break
+ [ -z lo ]
+ [ -z '' ]
+ COMMAND=create
+ uname -s
+ PLATFORM=FreeBSD
+ [ create = create ]
+ create_bridge
+ echo 'creating bridge0'
creating bridge0
+ sudo kldload if_bridge
+ sudo ifconfig bridge0 create
+ begin_tap
+ sudo kldload if_tap
+ seq 0 1
+ create_tap
+ echo 'creating tap0'
creating tap0
+ sudo ifconfig tap0 create
+ sudo chown lo /dev/tap0
+ sudo ifconfig tap0 up
+ sudo ifconfig bridge0 addm tap0
+ create_tap
+ echo 'creating tap1'
creating tap1
+ sudo ifconfig tap1 create
+ sudo chown lo /dev/tap1
+ sudo ifconfig tap1 up
+ sudo ifconfig bridge0 addm tap1
+ up_bridge
+ sudo ifconfig bridge0 up
```
```
+ basename ./cpu/native/tapsetup
+ PROGRAM=tapsetup
+ COUNT=2
+ COMMAND=''
+ BRNAME=tapbr0
+ TAPNAME=tap
+ DEACTIVATE_IPV6=''
+ true
+ BRNAME=bridge0
+ shift 2
+ true
+ [ COMMAND = create ]
+ COMMAND=delete
+ shift
+ true
+ break
+ [ -z lo ]
+ [ -z delete ]
+ uname -s
+ PLATFORM=FreeBSD
+ [ delete = create ]
+ [ delete = delete ]
+ delete_bridge
+ echo 'deleting bridge0'
deleting bridge0
+ sudo kldunload if_tap
+ sudo kldunload if_bridge
+ exit 0
```

master:
```
+ COMMAND=create
+ COUNT=''
+ DEFCOUNT=2
+ [ -z lo ]
+ [ -z create ]
+ [ create = create ]
+ [ -z '' ]
+ COUNT=2
+ sudo kldload if_tap
+ sudo kldload if_bridge
+ sudo sysctl net.link.tap.user_open=1
net.link.tap.user_open: 0 -> 1
+ echo 'creating  ...'
creating  ...
+ sudo ifconfig bridge0 create
+ sudo ifconfig bridge0 up
+ seq 0 1
+ sudo ifconfig tap0 create
+ sudo chown lo /dev/tap0
+ sudo ifconfig tap0 up
+ sudo ifconfig bridge0 addm tap0
+ sudo ifconfig tap1 create
+ sudo chown lo /dev/tap1
+ sudo ifconfig tap1 up
+ sudo ifconfig bridge0 addm tap1
+ exit 0
```

```
+ COMMAND=delete
+ COUNT=''
+ DEFCOUNT=2
+ [ -z lo ]
+ [ -z delete ]
+ [ delete = create ]
+ [ delete = delete ]
+ sudo sysctl net.link.tap.user_open=0
net.link.tap.user_open: 1 -> 0
+ sudo kldunload if_tap
+ sudo kldunload if_bridge
+ exit 0
```

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3182#issuecomment-111711033
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150613/671e090d/attachment.html>


More information about the notifications mailing list