![]() |
2010-03-13
, 15:40
|
Posts: 25 |
Thanked: 12 times |
Joined on Mar 2008
@ Warsaw, Poland
|
#3
|
![]() |
2010-05-13
, 12:32
|
Posts: 1 |
Thanked: 0 times |
Joined on May 2010
@ Żarki
|
#4
|
You can simply do
Will make sure not to double the rules up.Code:iptables -D <rule> 2>/dev/null || true iptables -A <rule>
The problem is, that the iptables rule gets multiplied when i connect and disconnect from my N900. I tried finding a signal that'd get emited when the usb cable is unplugged, to remove the iptables rule there, but there appears to be none (tried watching "initctl events").
Any ideas? i wouldn't want to create dozens of useless iptables rules.
(1) File /etc/event.d/usbtether, the "G_NOKIA_READY" signal only gets actually emitted when one selects "pc suite mode", but that's not a problem.
Last edited by arachnist; 2010-03-13 at 15:01.