From: Paul Hänsch Date: Sat, 24 Aug 2019 19:01:21 +0000 (+0200) Subject: avoid regenerating existing ssh key X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=211b579d6c234d78b0d30bd259d1e344d651529c;p=blast avoid regenerating existing ssh key --- diff --git a/modules/default.mk b/modules/default.mk index a0e88a2..6b1f08e 100644 --- a/modules/default.mk +++ b/modules/default.mk @@ -83,7 +83,7 @@ _rootpass: ${CFGROOT} chroot "$${CFGROOT}" usermod -p "$$(openssl passwd "$${rootpass}")" root ${rootkey}.pub: - ssh-keygen -N '' -f "$${rootkey}" + [ -f "$@" ] || ssh-keygen -N '' -f "$${rootkey}" _rootkey: ${CFGROOT} ${rootkey}.pub mkdir -m 700 "$${CFGROOT}/root/.ssh/"