Mario Marietto (12024-05-13): > The command iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE > doesn't work if invoked as a user,it says "you must be root". So,as > user,the script seems to be working fine like this : > > function jumpto > { > label=$1 > cmd=$(sed -n "/$label:/{:a;n;p;ba};" $0 | grep -v ':$') > eval "$cmd" > exit > }
You seem to be investing a lot of effort into a fragile solution to emulate a deprecated execution control primitive. Regards, -- Nicolas George