1
0
forked from ports/opt

dropbear: fix rc-script

This commit is contained in:
Juergen Daubert 2021-05-22 18:25:50 +02:00
parent 55ecfde383
commit 2a4ebee4d2
3 changed files with 26 additions and 43 deletions

View File

@ -1,7 +1,7 @@
untrusted comment: verify with /etc/ports/opt.pub untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/cpHM5I325/rdm29LwZsguYh0iad5pjSo7PnQRFiM432ddgbObomCP46LJMAEKMsxvZlk1bRjPL01GVKq2218g8= RWSE3ohX2g5d/dca4jCzCpCfuAWsWhODpNC5Ks2EGpuYu/yjodnRS3VYjS4hEq2JdPMcEnrte6x6cxrrI9cbHk8achTLMhGg4Qs=
SHA256 (Pkgfile) = c9c4ecb8a087f934f432578daa84fecb5a2e121d1a926dd28baf6deb88469a19 SHA256 (Pkgfile) = 33b046761053b5bf399aae889831d5f906e4e9df886a9e5978d7b04a8f30c730
SHA256 (.footprint) = 5d47799d69d21b860be70eb9e767298617679bcee2140d245cbc74f4a2a4502e SHA256 (.footprint) = 5d47799d69d21b860be70eb9e767298617679bcee2140d245cbc74f4a2a4502e
SHA256 (dropbear-2020.81.tar.bz2) = 48235d10b37775dbda59341ac0c4b239b82ad6318c31568b985730c788aac53b SHA256 (dropbear-2020.81.tar.bz2) = 48235d10b37775dbda59341ac0c4b239b82ad6318c31568b985730c788aac53b
SHA256 (dropbear.rc) = def8d4ebda5759a3bc55055957235fa47f7e40216badf07830f487f05e7fbd42 SHA256 (dropbear.rc) = 058090551dce466c7e61ff497d55bf97af02fac13b895dcbc69dabf186020965
SHA256 (dropbear.pam) = 0c0aff342e586e64f2d2a814ef127a2748b223e746c3efccfccc91a5aadbce4a SHA256 (dropbear.pam) = 0c0aff342e586e64f2d2a814ef127a2748b223e746c3efccfccc91a5aadbce4a

View File

@ -5,11 +5,11 @@
name=dropbear name=dropbear
version=2020.81 version=2020.81
release=1 release=2
source=(https://matt.ucc.asn.au/$name/releases/$name-$version.tar.bz2 \ source=(https://matt.ucc.asn.au/$name/releases/$name-$version.tar.bz2 \
dropbear.rc dropbear.pam) dropbear.rc dropbear.pam)
build () { build() {
cd $name-$version cd $name-$version
sed '/pam_start/s/sshd/dropbear/' -i svr-authpam.c sed '/pam_start/s/sshd/dropbear/' -i svr-authpam.c

View File

@ -7,35 +7,18 @@ SSD=/sbin/start-stop-daemon
PROG=/usr/sbin/dropbear PROG=/usr/sbin/dropbear
PID=/var/run/dropbear.pid PID=/var/run/dropbear.pid
CONV=/usr/bin/dropbearconvert
KEYG=/usr/bin/dropbearkey KEYG=/usr/bin/dropbearkey
RSA=/etc/dropbear/dropbear_rsa_host_key RSA=/etc/dropbear/dropbear_rsa_host_key
DSS=/etc/dropbear/dropbear_dss_host_key DSS=/etc/dropbear/dropbear_dss_host_key
ECDSA=/etc/dropbear/dropbear_ecdsa_host_key ECDSA=/etc/dropbear/dropbear_ecdsa_host_key
ED25519=/etc/dropbear/dropbear_ed25519_host_key
create_keys() { create_keys() {
if [ ! -f $RSA ]; then [ -f $RSA ] || $KEYG -t rsa -s 4096 -f $RSA
if [ -f /etc/ssh/ssh_host_rsa_key ]; then [ -f $DSS ] || $KEYG -t dss -f $DSS
$CONV openssh dropbear /etc/ssh/ssh_host_rsa_key $RSA [ -f $ECDSA ] || $KEYG -t ecdsa -s 521 -f $ECDSA
else [ -f ED25519 ] || $KEYG -t ed25519 -f $ED25519
$KEYG -t rsa -s 4096 -f $RSA
fi
fi
if [ ! -f $DSS ]; then
if [ -f /etc/ssh/ssh_host_dsa_key ]; then
$CONV openssh dropbear /etc/ssh/ssh_host_dsa_key $DSS
else
$KEYG -t dss -f $DSS
fi
fi
if [ ! -f $ECDSA ]; then
if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then
$CONV openssh dropbear /etc/ssh/ssh_host_ecdsa_key $ECDSA
else
$KEYG -t ecdsa -s 521 -f $ECDSA
fi
fi
} }
case $1 in case $1 in