summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/dropbear/XX_dropbear.sh
diff options
context:
space:
mode:
authorSebastian Schmelzer2008-09-26 20:00:59 +0200
committerSebastian Schmelzer2008-09-26 20:00:59 +0200
commit2625373a061637295a52d1553d440c3416266f1f (patch)
tree364a41e37541f12de0bab7fbd9c72265616757fc /os-plugins/plugins/dropbear/XX_dropbear.sh
parent * updatet to dropbear 0.51 (diff)
downloadcore-2625373a061637295a52d1553d440c3416266f1f.tar.gz
core-2625373a061637295a52d1553d440c3416266f1f.tar.xz
core-2625373a061637295a52d1553d440c3416266f1f.zip
* add import for stage 1 rsa keys
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2253 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/dropbear/XX_dropbear.sh')
-rw-r--r--os-plugins/plugins/dropbear/XX_dropbear.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/os-plugins/plugins/dropbear/XX_dropbear.sh b/os-plugins/plugins/dropbear/XX_dropbear.sh
index 28b9dbb1..b244cf5c 100644
--- a/os-plugins/plugins/dropbear/XX_dropbear.sh
+++ b/os-plugins/plugins/dropbear/XX_dropbear.sh
@@ -29,9 +29,19 @@ if [ -e /initramfs/plugin-conf/dropbear.conf ]; then
# create dropbear config dir
mkdir -p /etc/dropbear
-
+
+ # touch some files to get rid of error msgs
+ touch /var/log/lastlog
+ touch /var/log/wtmp
+
+ # copy ssh auth keys from stage1
+ cp -r /mnt/root/.ssh /root
+
+ # give root a valid shell
+ sed -i /etc/passwd -e "s/bash/sh/"
+
# convert openssh rsa key to dropbear key - if available
- if [ -e /mnt/etc/ssh/ssh_host_rsa_key ]
+ if [ -e /mnt/etc/ssh/ssh_host_rsa_key ]; then
dropbearconvert openssh dropbear /mnt/etc/ssh/ssh_host_rsa_key \
/etc/dropbear/dropbear_rsa_host_key
else