diff options
author | Damien Miller <djm@mindrot.org> | 2000-07-11 18:39:20 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-07-11 18:39:20 +1000 |
commit | 54ba469f20ff65fad2cc011ba2f83b17dce002f4 (patch) | |
tree | 28ea668828b738d59f1d7aaad2cfea794ec4130d /Makefile.in | |
parent | 4d97ba22570f1edebeed41ce33f7ca06475a173f (diff) |
- (djm) Don't generate host keys when $(DESTDIR) is set (e.g. during RPM
builds)
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in index d8a3f468..23e2bce8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -150,15 +150,17 @@ install-files: fi host-key: ssh-keygen - if [ -f "$(DESTDIR)$(sysconfdir)/ssh_host_key" ] ; then \ - echo "$(DESTDIR)$(sysconfdir)/ssh_host_key already exists, skipping." ; \ - else \ - ./ssh-keygen -b 1024 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" ; \ - fi ; \ - if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key ] ; then \ - echo "$(DESTDIR)$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \ - else \ - ./ssh-keygen -d -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" ; \ + if [ -z "$(DESTDIR)" ] ; then \ + if [ -f "$(DESTDIR)$(sysconfdir)/ssh_host_key" ] ; then \ + echo "$(DESTDIR)$(sysconfdir)/ssh_host_key already exists, skipping." ; \ + else \ + ./ssh-keygen -b 1024 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" ; \ + fi ; \ + if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key ] ; then \ + echo "$(DESTDIR)$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \ + else \ + ./ssh-keygen -d -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" ; \ + fi ; \ fi ; host-key-force: ssh-keygen |