05d6b7787b69c7a6cdf611505a04d43443be1cf2
[openwrt.git] / package / base-files / files / lib / preinit / 99_10_failsafe_login
1 #!/bin/sh
2 # Copyright (C) 2006 OpenWrt.org
3 # Copyright (C) 2010 Vertical Communications
4
5 failsafe_netlogin () {
6     telnetd -l /bin/login.sh <> /dev/null 2>&1    
7 }
8
9 failsafe_shell() {
10     lock /tmp/.failsafe
11     ash --login
12     echo "Please reboot system when done with failsafe network logins"
13 }
14
15
16 boot_hook_add failsafe failsafe_netlogin
17 boot_hook_add failsafe failsafe_shell
18