diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-04-04 09:35:55 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-04-04 09:35:55 +0000 |
commit | de0332f86a7d2017246a6c78ddad480005912e59 (patch) | |
tree | 9746171896c3d5ee4759394edf0bdab4d8531386 /package/base-files/files/bin/login.sh | |
parent | 714ffa32608e47de9260b1e950b9a74ca3a78da7 (diff) | |
download | mtk-20170518-de0332f86a7d2017246a6c78ddad480005912e59.zip mtk-20170518-de0332f86a7d2017246a6c78ddad480005912e59.tar.gz mtk-20170518-de0332f86a7d2017246a6c78ddad480005912e59.tar.bz2 |
rename our /bin/login script to /bin/login.sh to avoid collisions with busybox - we always use -l on telnetd anyway
SVN-Revision: 15097
Diffstat (limited to 'package/base-files/files/bin/login.sh')
-rwxr-xr-x | package/base-files/files/bin/login.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/package/base-files/files/bin/login.sh b/package/base-files/files/bin/login.sh new file mode 100755 index 0000000..ff5d366 --- /dev/null +++ b/package/base-files/files/bin/login.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +grep '^root:[^!]' /etc/passwd >&- 2>&- +[ "$?" = "0" -a -z "$FAILSAFE" ] && +{ + 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 |