[Olsr-dev] olsrd NOT start
Airton Ishimori
(spam-protected)
Thu Mar 11 17:02:44 CET 2010
I`m using whiterussian, and the contents of the file S53olsrd is
#!/bin/sh
date >> /etc/log_olsr
DEFAULT=/etc/default/olsrd
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
olsrd $OPTIONS
;;
*)
echo "usage: $0 (start)"
exit 1
esac
exit $?
And the contents of the file s60olsrd is:
#!/bin/sh
DEFAULT=/etc/default/olsrd
OPTIONS="-f /tmp/olsrd.conf"
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
lanip="$(nvram get lan_ipaddr)"
case "${lanip%\.*}" in
192.168.1|192.168.0)
HNA_IP=
HNA_MASK=
;;
*)
HNA_IP="$lanip"
HNA_MASK="$(nvram get lan_netmask)"
;;
esac
wifi_ifname="$(nvram get wifi_ifname)"
[ -z "$wifi_ifname" ] && grep '@INTERFACE@' /etc/olsrd.conf && {
echo No interface...
exit 1
}
(
cat <<EOF
@define HNA_IP $HNA_IP
@define HNA_MASK $HNA_MASK
@define INTERFACE "$wifi_ifname"
EOF
cat /etc/olsrd.conf
) | awk -f /usr/lib/parse-config.awk > /tmp/olsrd.conf
iptables -D forwarding_rule -i "$wifi_ifname" -j ACCEPT 2>/dev/null
>/dev/null # no duplicates please
iptables -D forwarding_rule -o "$wifi_ifname" -j ACCEPT 2>/dev/null
>/dev/null
iptables -A forwarding_rule -i "$wifi_ifname" -j ACCEPT
iptables -A forwarding_rule -o "$wifi_ifname" -j ACCEPT
[ -z "$HNA_IP" ] && {
iptables -t nat -D POSTROUTING -o "$wifi_ifname" -j MASQUERADE
2>/dev/null >/dev/null
iptables -t nat -A POSTROUTING -o "$wifi_ifname" -j MASQUERADE
}
olsrd $OPTIONS
;;
*)
echo "usage: $0 (start)"
exit 1
esac
exit $?
On Thu, Mar 11, 2010 at 12:55, Henning Rogge <(spam-protected)> wrote:
> Am Donnerstag 11 März 2010 16:45:37 schrieb Airton Ishimori:
> > Parsing file: "/etc/olsrd.conf"
> > An error occured somwhere between your keyboard and your chair!
> > usage: olsrd [-f <configfile>] [ -i interface1 interface2 ... ]
> > [-d <debug_level>] [-ipv6] [-multi <IPv6 multicast address>]
> > [-lql <LQ level>] [-lqw <LQ winsize>] [-lqnt <nat threshold>]
> > [-bcast <broadcastaddr>] [-ipc] [-dispin] [-dispout] [-delgw]
> > [-hint <hello interval (secs)>] [-tcint <tc interval (secs)>]
> > [-midint <mid interval (secs)>] [-hnaint <hna interval (secs)>]
> > [-T <Polling Rate (secs)>] [-nofork] [-hemu <ip_address>]
> > [-lql <LQ level>] [-lqa <LQ aging factor>]
> > Terminated
> >
> > Into of the /etc/init.d/ has:
> >
> > -rwxr-xr-x 1 root root 185 Jan 1 00:08 S53olsrd
>
> Maybe you can send us the content of this file ?
>
> Henning
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20100311/32292ab9/attachment.html>
More information about the Olsr-dev
mailing list