revert 4a86f8c9abd99b880b8a9c3609d330c7ff398ad5 and properly remove

the temporary ssh host keys file/directory.

(cherry picked from commit 95c05343ce292cd97c120f68131560947e25122c)
release-18.03-flake
AmineChikhaoui 2018-05-31 12:49:15 +01:00 committed by Rob Vermaas
parent 3eadeb7c3c
commit 91f7231b72
No known key found for this signature in database
GPG Key ID: 6B726FB2EE6F4255
1 changed files with 2 additions and 1 deletions

View File

@ -253,11 +253,12 @@ in
mv -f $SSH_HOST_KEYS_DIR/ssh_host_ed25519_key* /etc/ssh/
chmod 600 /etc/ssh/ssh_host_ed25519_key
chmod 644 /etc/ssh/ssh_host_ed25519_key.pub
rm $SSH_HOST_KEYS_DIR/*
else
echo "Setup of ssh host keys from http://metadata.google.internal/computeMetadata/v1/instance/attributes/ failed."
false
fi
rm -f $SSH_HOST_KEYS_DIR
rm -r $SSH_HOST_KEYS_DIR
'';
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;