Minor changes

Jump to: navigation, search

[edit] Changes to ben-net.sh

On my system which runs Trisquel (based on Ubuntu) I had to make the following changes to ben-net.sh:


  if (/usr/bin/lsusb -t -d "0525:a4a1"); then


  if ( /usr/bin/lsusb -t -d "0525:a4a1" ); then


  if !( /usr/sbin/iptables -L | grep $GATEWAY_IF ); then


  if !( /sbin/iptables -L -t nat -v | grep $GATEWAY_IF ); then

The first change was mostly cosmetic but may cause problems on some shells that require spacing.

The second change was necessary. Without it the script kept adding rules to the nat table as the nat table is not listed with just the -L option, also without the -v option the interface is not shown, and so we have the same problem of multiple rules being added. It should also be noted that even on a system where the -L option alone listed both the nat table and showed the interface you'd probably want to add the -n option to speed things up by avoiding the DNS look-ups.

Also if you are cutting and pasting from the web site use an editor with highlighting. I had to retype two of the "if" statements to get then to be parsed correctly. (must be some odd/hidden characters or something)

Hope this helps anyone having difficulties. Much thanks to the original poster. Saved me much time.

Freemor15:59, 11 August 2011

@Freemor thanks. wiki page updated. BTW: en.qi-hardware.com enable the anonymous edit.

Xiangfu02:44, 25 December 2011
Personal tools