rename our /bin/login script to /bin/login.sh to avoid collisions with busybox -...
authorFelix Fietkau <nbd@openwrt.org>
Sat, 4 Apr 2009 09:35:55 +0000 (09:35 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 4 Apr 2009 09:35:55 +0000 (09:35 +0000)
SVN-Revision: 15097

package/base-files/files/bin/login [deleted file]
package/base-files/files/bin/login.sh [new file with mode: 0755]
package/base-files/files/etc/preinit
package/busybox/files/telnet
target/linux/brcm-2.4/base-files/etc/preinit.arch

diff --git a/package/base-files/files/bin/login b/package/base-files/files/bin/login
deleted file mode 100755 (executable)
index ff5d366..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/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
diff --git a/package/base-files/files/bin/login.sh b/package/base-files/files/bin/login.sh
new file mode 100755 (executable)
index 0000000..ff5d366
--- /dev/null
@@ -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
index 89dc3bc..7644383 100755 (executable)
@@ -11,7 +11,7 @@ failsafe() {
        [ -n "$ifname" ] && grep "$ifname" /proc/net/dev >/dev/null && {
                failsafe_ip
                netmsg 192.168.1.255 "Entering Failsafe!"
-               telnetd -l /bin/login <> /dev/null 2>&1
+               telnetd -l /bin/login.sh <> /dev/null 2>&1
        }
        lock /tmp/.failsafe
        ash --login
index ec99172..082aba7 100755 (executable)
@@ -7,7 +7,7 @@ start() {
                awk -F: '/^root:/ && ($2 != "") && ($2 !~ /\!/) {exit 1}' /etc/passwd 2>/dev/null || \
                ( [ \! -x /usr/sbin/dropbear ] && [ \! -x /usr/sbin/sshd ] )
        then \
-               telnetd -l /bin/login
+               telnetd -l /bin/login.sh
        fi
 }
 
index 1b3c924..25d11d9 100755 (executable)
@@ -15,7 +15,7 @@ failsafe() {
        }
 
        netmsg 192.168.1.255 "Entering Failsafe!"
-       telnetd -l /bin/login <> /dev/null 2>&1
+       telnetd -l /bin/login.sh <> /dev/null 2>&1
 
        ash --login
 }