logIt Log Around The Clock

Posts Tagged ‘shell script’

Function Return Value ?

tags:

The following function: 1 2 3 processLine(){ <strong>line</strong>="$@" } Does it have some sort of “return value”? (in this case the variable line) by calling it through: processLine $line echo $line In the above example, I echo the value of line after being processed by processLine(). (?)

Startup script for TAP interfaces

To add startup script we can use: System > Preferences > Sessions local boot script (as services start/stop in /etc/init.d/) I added the following shell script: setup-tap: #! /bin/bash tap_up() { tunctl -t tap0 -u $USER tunctl -t tap1 -u $USER ifconfig tap0 192.168.20.1 ifconfig tap1 192.168.40.1 #iptables -t nat -A POSTROUTING -o eth1 -j [...]