rename our /bin/login script to /bin/login.sh to avoid collisions with busybox -...
[openwrt/svn-archive/archive.git] / package / base-files / files / bin / login.sh
1 #!/bin/sh
2 # Copyright (C) 2006 OpenWrt.org
3
4 grep '^root:[^!]' /etc/passwd >&- 2>&-
5 [ "$?" = "0" -a -z "$FAILSAFE" ] &&
6 {
7 echo "Login failed."
8 exit 0
9 } || {
10 cat << EOF
11 === IMPORTANT ============================
12 Use 'passwd' to set your login password
13 this will disable telnet and enable SSH
14 ------------------------------------------
15 EOF
16 }
17
18 exec /bin/ash --login