1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006-2011 OpenWrt.org
6 local pwd=$
([ -f "$1" ] && cat "$1")
14 local homedir
=$
([ -f "$1" ] && cat "$1")
15 homedir
="${homedir#*:*:0:0:*:}"
21 ( /etc
/init.d
/dropbear enabled
2> /dev
/null
&& grep -qs "^ssh-" /etc
/dropbear
/authorized_keys
) || \
22 ( /etc
/init.d
/sshd enabled
2> /dev
/null
&& grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh
/authorized_keys
)
26 if ( ! has_ssh_pubkey
&& \
27 ! has_root_pwd
/etc
/passwd
&& ! has_root_pwd
/etc
/shadow
) || \
28 ( ! /etc
/init.d
/dropbear enabled
2> /dev
/null
&& ! /etc
/init.d
/sshd enabled
2> /dev
/null
);
30 telnetd
-l /bin
/login.sh
35 killall telnetd
2>/dev
/null
This page took 0.051281 seconds and 5 git commands to generate.