fix failsafe for jffs2
authorMike Baker <mbm@openwrt.org>
Wed, 29 Mar 2006 08:49:40 +0000 (08:49 +0000)
committerMike Baker <mbm@openwrt.org>
Wed, 29 Mar 2006 08:49:40 +0000 (08:49 +0000)
SVN-Revision: 3538

openwrt/package/base-files/default/bin/login

index 9d90735c3563510ca53cf35316e3bb8d4fa9bc98..8f9281726d5ac1d06cd7c038347973771cf2f608 100755 (executable)
@@ -1,9 +1,10 @@
 #!/bin/sh
-grep '^root:[^!]' /etc/passwd >&- 2>&- &&
+grep '^root:[^!]' /etc/passwd >&- 2>&-
+[ "$?" = "0" -a -z "$FAILSAFE" ]  &&  
 {
     echo "Login failed."
     exit 0
-  } || {
+} || {
 cat << EOF
  === IMPORTANT ============================
   Use 'passwd' to set your login password