0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-06-26 03:21:22 +02:00
doodle3d-firmware/src/script/dhcpcheck_init
2013-12-20 16:29:46 +01:00

22 lines
670 B
Bash

#!/bin/sh /etc/rc.common
# This file is part of the Doodle3D project (http://doodle3d.com).
#
# Copyright (c) 2013, Doodle3D
# This software is licensed under the terms of the GNU GPL v2 or later.
# See file LICENSE.txt or visit http://www.gnu.org/licenses/gpl.html for full license details.
# start after all other scripts
START=99
LOGGER="logger -t dhcpcheck -p 6"
boot() {
logread | grep "192.168.10.249, lease time 12h"
if [ $? -ne 0 ]; then
$LOGGER "Applying workaround for dhcp/dnsmasq issue. See: https://github.com/Doodle3D/doodle3d-client/issues/66"
/etc/init.d/dnsmasq reload
else
$LOGGER "DHCP configuration is in order, not doing anything"
fi
}