added axe kernel modules, dropbear, rewrite inittab system, use /dev/mtdblock4 for config
This commit is contained in:
24
fs-add/etc/init.d/dropbear
Executable file
24
fs-add/etc/init.d/dropbear
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
test -r /etc/sysconfig/config && . /etc/sysconfig/config
|
||||
|
||||
if test "$DROPBEAR" != "yes"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! test -r /etc/dropbear/dropbear_dss_host_key; then
|
||||
mkdir -p /etc/dropbear
|
||||
if test -r /etc/sysconfig/dropbear_dss_host_key; then
|
||||
cp /etc/sysconfig/dropbear_dss_host_key /etc/dropbear/dropbear_dss_host_key
|
||||
else
|
||||
dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
|
||||
cp /etc/dropbear/dropbear_dss_host_key /etc/sysconfig/dropbear_dss_host_key
|
||||
fi
|
||||
fi
|
||||
export HOME=/root
|
||||
if test -r /etc/sysconfig/authorized_keys ; then
|
||||
mkdir -p $HOME/.ssh
|
||||
cp /etc/sysconfig/authorized_keys $HOME/.ssh/authorized_keys
|
||||
chmod 0600 $HOME/.ssh/authorized_keys
|
||||
fi
|
||||
exec dropbear -F
|
Reference in New Issue
Block a user