summaryrefslogtreecommitdiffstats
path: root/rescue/startssh
diff options
context:
space:
mode:
authorMaarten Vanraes <alien@mageia.org>2012-02-25 16:09:50 +0000
committerMaarten Vanraes <alien@mageia.org>2012-02-25 16:09:50 +0000
commit2b26ee7be0a60371a187a1c8ec9fc5f7236b156f (patch)
tree14d9de16b348176d55b565928bb8c09bf8b0a2ab /rescue/startssh
parent79a2cfd730452ba03d1733a70f2f6df65c00e712 (diff)
downloaddrakx-2b26ee7be0a60371a187a1c8ec9fc5f7236b156f.tar
drakx-2b26ee7be0a60371a187a1c8ec9fc5f7236b156f.tar.gz
drakx-2b26ee7be0a60371a187a1c8ec9fc5f7236b156f.tar.bz2
drakx-2b26ee7be0a60371a187a1c8ec9fc5f7236b156f.tar.xz
drakx-2b26ee7be0a60371a187a1c8ec9fc5f7236b156f.zip
- fix wrong dates in the NEWS file
- add logging to dropbear - make sure /dev/pts is mounted (mga#1023) - make root user homedir /root - add agetty (mga#2052)
Diffstat (limited to 'rescue/startssh')
-rwxr-xr-xrescue/startssh7
1 files changed, 6 insertions, 1 deletions
diff --git a/rescue/startssh b/rescue/startssh
index 4c585bc7f..19795aaa1 100755
--- a/rescue/startssh
+++ b/rescue/startssh
@@ -7,12 +7,17 @@ if (( $? != 0 )); then
exit $?
fi
+# change passwd file
sed -E -i -e 's/^root:[^:]*:/root:'"$passwd"':/' /etc/passwd
+# dropbear must have /dev/pts mounted
+grep '^devpts /dev/pts devpts ' /proc/mounts >/dev/null 2>/dev/null || mount -t devpts devpts /dev/pts
+
+# generate host keys
mkdir -p /etc/dropbear
[[ -f /etc/dropbear/dropbear_dss_host_key ]] || dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key >/dev/null
[[ -f /etc/dropbear/dropbear_rsa_host_key ]] || dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key >/dev/null
echo ""
echo -n "Starting ssh daemon... "
-dropbear && echo "OK"
+dropbear -E 2>/var/log/dropbear.log && echo "OK"