summaryrefslogtreecommitdiff
path: root/tools/build-on-freebsd
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build-on-freebsd')
-rwxr-xr-xtools/build-on-freebsd6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/build-on-freebsd b/tools/build-on-freebsd
index da33e4b0..7d19f44c 100755
--- a/tools/build-on-freebsd
+++ b/tools/build-on-freebsd
@@ -32,6 +32,9 @@ if [ "$1" = "run" ]
then
echo "Ok, now let's see if it works."
+ # Backup SSH keys
+ mv /etc/ssh/ssh_host_* /tmp/
+
# Remove old metadata
rm -rf /var/lib/cloud
@@ -40,4 +43,7 @@ then
# Start:
/usr/local/etc/rc.d/cloudinit start
+
+ # Restore SSH keys
+ mv /tmp/ssh_host_* /etc/ssh/
fi