summaryrefslogtreecommitdiff
path: root/openwrt/package/base-files/default/bin/login
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-04-05 02:09:22 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-04-05 02:09:22 +0000
commitee27e41337497f69d27cd689fe19ba2c89e95f79 (patch)
tree302d5239acd2ed8e10f5310599a381bb22f193e0 /openwrt/package/base-files/default/bin/login
parente4b534024d6dc903ef48628dda1203d0d7c5bfcb (diff)
downloadmtk-20170518-ee27e41337497f69d27cd689fe19ba2c89e95f79.zip
mtk-20170518-ee27e41337497f69d27cd689fe19ba2c89e95f79.tar.gz
mtk-20170518-ee27e41337497f69d27cd689fe19ba2c89e95f79.tar.bz2
large init script cleanup and merge of whiterussian changes, new dnsmasq config handling
SVN-Revision: 3588
Diffstat (limited to 'openwrt/package/base-files/default/bin/login')
-rwxr-xr-xopenwrt/package/base-files/default/bin/login12
1 files changed, 4 insertions, 8 deletions
diff --git a/openwrt/package/base-files/default/bin/login b/openwrt/package/base-files/default/bin/login
index bb065e5..8f92817 100755
--- a/openwrt/package/base-files/default/bin/login
+++ b/openwrt/package/base-files/default/bin/login
@@ -1,20 +1,16 @@
#!/bin/sh
-. /etc/sysconf 2>&-
-
-[ "$FAILSAFE" != "true" ] &&
-[ "$BR2_SYSCONF_TELNET_FAILSAFE_ONLY" = "y" ] &&
+grep '^root:[^!]' /etc/passwd >&- 2>&-
+[ "$?" = "0" -a -z "$FAILSAFE" ] &&
{
- grep '^root:[^!]' /etc/passwd >&- 2>&- &&
- {
echo "Login failed."
exit 0
- } || {
+} || {
cat << EOF
=== IMPORTANT ============================
Use 'passwd' to set your login password
this will disable telnet and enable SSH
------------------------------------------
EOF
- }
}
+
exec /bin/ash --login