base-files: fix telnet login on musl
authorFelix Fietkau <nbd@openwrt.org>
Mon, 20 Oct 2014 15:07:19 +0000 (15:07 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 20 Oct 2014 15:07:19 +0000 (15:07 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43006

package/base-files/files/bin/login.sh

index 04b3fe25021b6c3e60c2b298119761e5113c3480..25627b66b299ed2b5d7aea03a38bd6462e4102f5 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 # Copyright (C) 2006-2011 OpenWrt.org
 
-if ( ! grep -qs '^root:[!x]\?:' /etc/shadow || \
-     ! grep -qs '^root:[!x]\?:' /etc/passwd ) && \
+if ( ! grep -qsE '^root:[!x]?:' /etc/shadow || \
+     ! grep -qsE '^root:[!x]?:' /etc/passwd ) && \
    [ -z "$FAILSAFE" ]
 then
        echo "Login failed."