modules/freifunk: silence grep errors if /etc/crontabs/root does not exist
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 1 May 2009 14:16:28 +0000 (14:16 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 1 May 2009 14:16:28 +0000 (14:16 +0000)
modules/freifunk/root/etc/init.d/freifunk

index 40fa508..d90e3ff 100755 (executable)
@@ -5,6 +5,8 @@
 START=99
 
 boot() {
 START=99
 
 boot() {
+       test -f /etc/crontabs/root || touch /etc/crontabs/root
+
        grep -q 'killall -HUP dnsmasq' /etc/crontabs/root || {
                echo "*/5 * * * *       killall -HUP dnsmasq" >> /etc/crontabs/root
        }
        grep -q 'killall -HUP dnsmasq' /etc/crontabs/root || {
                echo "*/5 * * * *       killall -HUP dnsmasq" >> /etc/crontabs/root
        }