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 89dc3bcfdf0fd0a5d1e3b09ac73ac6b5a04275c4..76443836e39e055642d02da5dcd0f8e9784c14d6 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 ec99172cfd30fb534d120ff8f42c05d293c91d21..082aba7e90b9984cd024751925b6e3effc0ecb84 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 1b3c924cedef0d311a466bd8b9a2b4d93ef9f676..25d11d96ab417b69c79aace5a233f47a6d856ac1 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
 }