libpcap: Fix build when PACKAGECONFIG ipv6 is not enabled
[15.05/openwrt.git] / package / base-files / files / bin / login.sh
1 #!/bin/sh
2 # Copyright (C) 2006-2011 OpenWrt.org
3
4 if ( ! grep -qsE '^root:[!x]?:' /etc/shadow || \
5      ! grep -qsE '^root:[!x]?:' /etc/passwd ) && \
6    [ -z "$FAILSAFE" ]
7 then
8         echo "Login failed."
9         exit 0
10 else
11 cat << EOF
12  === IMPORTANT ============================
13   Use 'passwd' to set your login password
14   this will disable telnet and enable SSH
15  ------------------------------------------
16 EOF
17 fi
18
19 exec /bin/ash --login