mir3c/squashfs-root/bin/login.sh

15 lines
299 B
Bash
Raw Normal View History

2018-05-25 08:49:31 +00:00
#!/bin/sh
# Copyright (C) 2006-2011 OpenWrt.org
if ( ! grep -qs '^root:[!x]\?:' /etc/shadow || \
! grep -qs '^root:[!x]\?:' /etc/passwd ) && \
[ -z "$FAILSAFE" ]
then
ft_mode=`cat /proc/xiaoqiang/ft_mode`
if [ "$ft_mode" = "1" ]; then
exec /bin/ash --login
else
busybox login
fi
fi