[Commotion-dev] Freifunk watchdog

Dan Staples danstaples at opentechinstitute.org
Tue Apr 30 16:18:42 UTC 2013


Also, Freifunk-watchdog is really controlling when it comes to the
wireless interfaces. When commotiond is in the middle of setting
everything up, ffwatchd will intervene and shut down the wireless
interfaces because the BSSID or channel doesn't match what's in
/etc/config/wireless at that particular moment. And that's a pain in the
ass.

So while ffwatchd is good at keeping processes alive, we need to figure
out how to prevent it from messing up the networking. I propose
modifying /etc/init.d/network to include this start function (changes in
bold):

start() {
        stop
        [ -e /proc/sys/kernel/core_pattern ] && {
                ulimit -c unlimited
                echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
        }
        service_start /sbin/netifd

        setup_switch() { return 0; }

        include /lib/network
        setup_switch

        sleep 5

        *cp /etc/crontabs/root**/etc/crontabs/root.backup**
**       sed -i -e '/ffwatchd running/d' /etc/crontabs/root**
**       /etc/init.d/freifunk-watchdog stop*

        /sbin/wifi down
        /sbin/wifi up

        *mv /etc/crontabs/root.backup /etc/crontabs/root**
**       /etc/init.d/freifunk-watchdog start*
}

Would this be sufficient for keeping ffwatchd from meddling with the
wireless interfaces as commotiond configured everything and/or when
networking was (re)started?

-Dan

On 04/30/2013 09:44 AM, Dan Staples wrote:
> So although Freifunk-watchdog is installed on Commotion-openwrt, we
> don't really take advantage of it. It currently only watches dropbear
> and cron. Is there any reason we shouldn't add entries for the core
> Commotion components? Since we've been having problems with olsrd
> inexplicably shutting down, I think the watchdog could help. Here's a
> /etc/config/freifunk-watchdog I'd like to add by default to DR1:
>
> config process
>         option process 'dropbear'
>         option initscript '/etc/init.d/dropbear'
>
> config process
>         option process 'crond'
>         option initscript '/etc/init.d/cron'
>
> config process
>         option process 'commotiond'
>         option initscript '/etc/init.d/commotiond'
>
> config process
>         option process 'servald'
>         option initscript '/etc/init.d/serval-dna'
>
> config process
>         option process 'avahi-daemon'
>         option initscript '/etc/init.d/avahi-daemon'
>
> config process
>         option process 'olsrd'
>         option initscript '/etc/init.d/olsrd'
>
> config process
>         option process 'dnsmasq'
>         option initscript '/etc/init.d/dnsmasq'
>
> I didn't add firewall, in case folks want to turn that off. Is there
> anything I'm missing? Any reason not to do this?
>
> -Dan
>

-- 
Dan Staples

Open Technology Institute
https://commotionwireless.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-dev/attachments/20130430/3b70e0a7/attachment.html>


More information about the Commotion-dev mailing list