[packages] olsrd: init: cleanup an expensive/forky call
authorzioproto <zioproto@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 19 Feb 2013 17:01:38 +0000 (17:01 +0000)
committerzioproto <zioproto@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 19 Feb 2013 17:01:38 +0000 (17:01 +0000)
commitff88c81664f8d04023e788593edd301d4ef8a5b1
tree9caaa78e45cc02e17021b9b7ab5cf14569fb80dd
parent37a9b36d0b6953d630c8542b7f5be9db95a4bdda
[packages] olsrd: init: cleanup an expensive/forky call

for determining all gateways in all routing tables
1) write out the ip-call, never ever abbreviate in scripts
2) avoid forks: sorting/uniq is not needed, if we only append
   yet unappended words
3) use an extra function() for this, better readable
4) check for installed ip-command

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>
git-svn-id: svn://svn.openwrt.org/openwrt/packages@35680 3c298f89-4303-0410-b956-a3cf2f4a3e73
net/olsrd/files/olsrd.init