Update xfsprogs to 3.1.4 to 3.1.7
[openwrt.git] / package / base-files / files / bin / login.sh
index a64c84e1e2dc918086cbadad0b78366a29cd7f09..04b3fe25021b6c3e60c2b298119761e5113c3480 100755 (executable)
@@ -1,7 +1,10 @@
 #!/bin/sh
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 
-if grep -qs '^root:[^!]' /etc/passwd /etc/shadow && [ -z "$FAILSAFE" ]; then
+if ( ! grep -qs '^root:[!x]\?:' /etc/shadow || \
+     ! grep -qs '^root:[!x]\?:' /etc/passwd ) && \
+   [ -z "$FAILSAFE" ]
+then
        echo "Login failed."
        exit 0
 else