1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
--- lessdisks-0.5.3cvs.20040906.orig/base/init.d-scripts/lessdisks
+++ lessdisks-0.5.3cvs.20040906/base/init.d-scripts/lessdisks
@@ -60,6 +60,16 @@
;;
esac
+if [ "true" = "$ssh_reset_keys" ]; then
+ if [ -d /etc/ssh ]; then
+ copy_dirs="$copy_dirs /etc/ssh"
+ else
+ echo 'WARNING: ssh_reset_keys is set, but /etc/ssh is not a directory!'
+ echo 'disabling ssh_reset_keys'
+ ssh_reset_keys=false
+ fi
+fi
+
if [ "$rwfilesystem" = "translucency" ] ; then
# requires the translucency kernel module
# makes / appear to be read-writeable...
@@ -108,6 +118,14 @@
fi
+if [ "true" = "$ssh_reset_keys" ]; then
+ echo "(re)generating ssh keys... this will take a bit..."
+ echo "ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key"
+ ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key
+ echo "ssh-keygen -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key"
+ ssh-keygen -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key
+fi
+
# generates the MAC address
macaddress=`ifconfig | grep HWaddr | awk '{print $5}'`
|