allow telnet login when ssh password is not set
[openwrt.git] / openwrt / target / default / target_skeleton / bin / login
1 #!/bin/sh
2 [ "$FAILSAFE" = "true" ] && exec /bin/ash --login
3
4 [ -f /etc/sysconf ] && . /etc/sysconf
5
6 if [ "$BR2_SYSCONF_TELNET_FAILSAFE_ONLY" = "y" ]; then
7 if grep '^root:!' /etc/passwd > /dev/null 2>/dev/null; then
8 echo "You need to set a login password to protect your"
9 echo "Router from unauthorized access."
10 echo
11 echo "Use 'passwd' to set your password."
12 echo "telnet login will be disabled afterwards,"
13 echo "You can then login using SSH."
14 echo
15 else
16 echo "Login failed."
17 exit 0
18 fi
19 fi
20
21 exec /bin/ash --login
This page took 0.04898 seconds and 5 git commands to generate.