diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-09-01 23:02:29 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-09-01 23:02:29 +0000 |
commit | f8b5b746aca6a9c49d43a98ebeb4b43b344f91ca (patch) | |
tree | f5f3f5a9ba8a9e1756cc158d4eb7608f6f75e54e /contrib/package/olsrd-luci/files/etc | |
parent | c245841b4818075ad9d3fb8bc1f0b3b97b24a2e7 (diff) |
* luci/contrib: add fork of openwrt olsrd
Diffstat (limited to 'contrib/package/olsrd-luci/files/etc')
-rw-r--r-- | contrib/package/olsrd-luci/files/etc/config/olsr | 42 | ||||
-rw-r--r-- | contrib/package/olsrd-luci/files/etc/default/olsrd | 8 | ||||
-rwxr-xr-x | contrib/package/olsrd-luci/files/etc/init.d/olsrd | 37 |
3 files changed, 87 insertions, 0 deletions
diff --git a/contrib/package/olsrd-luci/files/etc/config/olsr b/contrib/package/olsrd-luci/files/etc/config/olsr new file mode 100644 index 0000000000..a1fe65aa7c --- /dev/null +++ b/contrib/package/olsrd-luci/files/etc/config/olsr @@ -0,0 +1,42 @@ +config 'olsr' 'general' + option 'DebugLevel' '0' + option 'IpVersion' '4' + option 'AllowNoInt' 'yes' + option 'Pollrate' '0.025' + option 'TcRedundancy' '2' + option 'MprCoverage' '7' + option 'LinkQualityFishEye' '1' + option 'LinkQualityWinSize' '100' + option 'LinkQualityDijkstraLimit' '0 9.0' + option 'LinkQualityLevel' '2' + option 'UseHysteresis' 'no' + +config 'LoadPlugin' 'dyn_gw' + option 'Library' 'olsrd_dyn_gw.so.0.4' + +config 'LoadPlugin' 'nameservice' + option 'Library' 'olsrd_nameservice.so.0.3' + option 'suffix' '.olsr' + option 'latlon_infile' '/tmp/latlon.txt' + option 'hosts_file' '/var/etc/hosts' + option 'name' 'luci-node' + +config 'LoadPlugin' 'txtinfo' + option 'Library' 'olsrd_txtinfo.so.0.1' + option 'Accept' '127.0.0.1' + +config 'Interface' + option 'HelloInterval' '6.0' + option 'MidValidityTime' '324.0' + option 'TcInterval' '4.0' + option 'HnaValidityTime' '108.0' + option 'HelloValidityTime' '108.0' + option 'TcValidityTime' '324.0' + option 'HnaInterval' '18.0' + option 'MidInterval' '18.0' + option 'Interface' 'br-ff' + +config 'ipc' 'IpcConnect' + option 'MaxConnections' '0' + option 'Host' '127.0.0.1 10.0.0.5' + option 'Net' '192.168.1.0 255.255.255.0 10.0.0.0 255.0.0.0' diff --git a/contrib/package/olsrd-luci/files/etc/default/olsrd b/contrib/package/olsrd-luci/files/etc/default/olsrd new file mode 100644 index 0000000000..d89e007bd4 --- /dev/null +++ b/contrib/package/olsrd-luci/files/etc/default/olsrd @@ -0,0 +1,8 @@ +# you can override olsrd's startup variables here +#BIN=/usr/sbin/olsrd +#CONF=/var/etc/olsrd.conf +#PID=/var/run/olsrd.pid + +# place your custom olsrd parameters here +OPTIONS= + diff --git a/contrib/package/olsrd-luci/files/etc/init.d/olsrd b/contrib/package/olsrd-luci/files/etc/init.d/olsrd new file mode 100755 index 0000000000..04c3a75787 --- /dev/null +++ b/contrib/package/olsrd-luci/files/etc/init.d/olsrd @@ -0,0 +1,37 @@ +#!/bin/sh /etc/rc.common +START=50 + +BIN=/usr/sbin/olsrd +CONF=/var/etc/olsrd.conf +DEFAULT=/etc/default/olsrd +PID=/var/run/olsrd.pid + +start() { + ### load defaults + [ -f $DEFAULT ] && . $DEFAULT + + ### generate config + mkdir -p ${CONF%/*} + lua /lib/config/olsr.lua > $CONF + + ### check for running instance (start-stop-daemon is too stupid to do this) + if [ -s $PID ]; then + if kill -0 $(cat $PID) 2>&-; then + echo "there is already a running instance ($(cat $PID))" + exit 1 + fi + fi + + ### start olsrd + start-stop-daemon -b -m -p $PID -x $BIN -S -- -f $CONF -nofork $OPTIONS +} + +stop() { + ### stop olsrd + start-stop-daemon -q -p $PID -a ${BIN##*/} -K +} + +restart() { + ### override generic restart because we need some time between stop and start + stop; sleep 3; start +} |