summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHarm Weites <harm@weites.com>2014-08-10 09:41:42 +0000
committerHarm Weites <harm@weites.com>2014-08-10 09:41:42 +0000
commit891496973520c91fd02ccfc55aa606234418accb (patch)
treeb25b65dffe5eab4468874e1876cdcbbf380cc31f /tools
parent7e0407491345989a2640149a9a365b6f7167c7af (diff)
downloadvyos-cloud-init-891496973520c91fd02ccfc55aa606234418accb.tar.gz
vyos-cloud-init-891496973520c91fd02ccfc55aa606234418accb.zip
change: Save and restore the SSH keys between builds.
Diffstat (limited to 'tools')
-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