#!/bin/sh /etc/rc.common
# Freifunk Init
# $Id: freifunk 4214 2009-01-31 17:32:35Z jow $

START=99

boot() {
	grep -q 'killall -HUP dnsmasq' /etc/crontabs/root || {
		echo "*/5 * * * *	killall -HUP dnsmasq" >> /etc/crontabs/root
	}

	grep -q '/usr/sbin/ff_olsr_test_gw' /etc/crontabs/root || {
		echo "* * * * *		/usr/sbin/ff_olsr_test_gw" >> /etc/crontabs/root
	}

	[ -f /etc/rc.local ] && . /etc/rc.local
	[ -d /etc/rc.local.d ] && {
		for file in /etc/rc.local.d/*; do
			test -f "$file" && . "$file"
		done
	}

	killall -HUP crond 2>/dev/null || /etc/init.d/cron start
}
