base-files: Allow to disable failsafe mode
[openwrt/svn-archive/archive.git] / package / base-files / files / lib / preinit / 10_indicate_failsafe
1 #!/bin/sh
2 # Copyright (C) 2006 OpenWrt.org
3 # Copyright (C) 2010 Vertical Communications
4
5 # commands for emitting messages to network in failsafe mode
6
7 indicate_failsafe_led () {
8 set_state failsafe
9 }
10
11 indicate_failsafe() {
12 [ "$pi_preinit_no_failsafe" = "y" ] && return
13 echo "- failsafe -"
14 preinit_net_echo "Entering Failsafe!\n"
15 indicate_failsafe_led
16 }
17
18 boot_hook_add failsafe indicate_failsafe