From 895c12e5226d70edf4c7ca60e0c8d925cc9abefb Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 12 Oct 2011 14:33:18 +0200 Subject: [PATCH] openssh-server: use ssh-keygen -A to replace the systemd helper script. --- srcpkgs/openssh/files/sshdgenkeys.scripts | 16 ---------------- srcpkgs/openssh/files/sshdgenkeys.service | 7 ++----- srcpkgs/openssh/openssh-server.template | 4 +--- srcpkgs/openssh/template | 1 - 4 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 srcpkgs/openssh/files/sshdgenkeys.scripts diff --git a/srcpkgs/openssh/files/sshdgenkeys.scripts b/srcpkgs/openssh/files/sshdgenkeys.scripts deleted file mode 100644 index 91a86706e53..00000000000 --- a/srcpkgs/openssh/files/sshdgenkeys.scripts +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if [ ! -e /etc/ssh/ssh_host_key ]; then - /usr/bin/ssh-keygen -t rsa1 -b 4096 -f /etc/ssh/ssh_host_key -N '' -fi -if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then - /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' -fi -if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then - /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' -fi -if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then - /usr/bin/ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N '' -fi - -exit 0 diff --git a/srcpkgs/openssh/files/sshdgenkeys.service b/srcpkgs/openssh/files/sshdgenkeys.service index 8edfa65d253..d241ab0f6d8 100644 --- a/srcpkgs/openssh/files/sshdgenkeys.service +++ b/srcpkgs/openssh/files/sshdgenkeys.service @@ -1,12 +1,9 @@ [Unit] Description=OpenSSH server Key Generation -ConditionPathExists=|!/etc/ssh/ssh_host_key -ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key -ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key -ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key [Service] -ExecStart=/lib/systemd/scripts/sshdgenkeys +Type=oneshot +ExecStart=/usr/bin/ssh-keygen -A RemainAfterExit=yes [Install] diff --git a/srcpkgs/openssh/openssh-server.template b/srcpkgs/openssh/openssh-server.template index 37f0cfb245f..7d999a115fd 100644 --- a/srcpkgs/openssh/openssh-server.template +++ b/srcpkgs/openssh/openssh-server.template @@ -5,7 +5,7 @@ long_desc="${long_desc} This package contains the ${pkgname} server files." -revision=1 +revision=2 conf_files="/etc/ssh/sshd_config /etc/pam.d/sshd" systemd_services="sshd.service sshdgenkeys.service" @@ -31,7 +31,5 @@ do_install() vmove etc/pam.d etc vinstall ${FILESDIR}/sshd.service 644 lib/systemd/system vinstall ${FILESDIR}/sshdgenkeys.service 644 lib/systemd/system - vinstall ${FILESDIR}/sshdgenkeys.scripts 755 \ - lib/systemd/scripts sshdgenkeys vinstall ${FILESDIR}/sshd.tmpfiles.d 644 usr/lib/tmpfiles.d sshd.conf } diff --git a/srcpkgs/openssh/template b/srcpkgs/openssh/template index 79dabb784a9..35101fc4322 100644 --- a/srcpkgs/openssh/template +++ b/srcpkgs/openssh/template @@ -50,7 +50,6 @@ post_install() vinstall contrib/findssl.sh 755 usr/bin findssl vinstall contrib/ssh-copy-id 755 usr/bin vinstall contrib/ssh-copy-id.1 644 usr/share/man/man1 - vinstall ${FILESDIR}/sshd.rc 755 etc/init.d sshd vinstall LICENCE 644 usr/share/licenses/${pkgname} sed -i \