summaryrefslogtreecommitdiff
path: root/target/default/target_skeleton/bin
diff options
context:
space:
mode:
Diffstat (limited to 'target/default/target_skeleton/bin')
-rwxr-xr-xtarget/default/target_skeleton/bin/login11
1 files changed, 10 insertions, 1 deletions
diff --git a/target/default/target_skeleton/bin/login b/target/default/target_skeleton/bin/login
index 75208248d8..bf06359dee 100755
--- a/target/default/target_skeleton/bin/login
+++ b/target/default/target_skeleton/bin/login
@@ -1,2 +1,11 @@
#!/bin/sh
-exec ash --login
+[ "$FAILSAFE" = "true" ] && exec /bin/ash --login
+
+[ -f /etc/sysconf ] && . /etc/sysconf
+
+if [ "$BR2_SYSCONF_TELNET_FAILSAFE_ONLY" = "y" ]; then
+ echo "Login failed."
+ exit 0
+fi
+
+exec /bin/ash --login