# HG changeset patch # User Aleksej Bobylev # Date 1449787259 -7200 # Node ID e2e3be9972facf2a07cd7d911f686b6fdd187a2a # Parent b103fbd6b3b8a06a43e51bfcdec10972bcac5ec2 openssh, openssh-pam: fix post_install() with --root diff -r b103fbd6b3b8 -r e2e3be9972fa openssh-pam/receipt --- a/openssh-pam/receipt Thu Dec 10 21:28:40 2015 +0100 +++ b/openssh-pam/receipt Fri Dec 11 00:40:59 2015 +0200 @@ -40,7 +40,7 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh + mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh cp -a $install/usr/sbin $install/usr/bin $fs/usr rm -f $fs/usr/sbin/sftp-server cp -a $install/etc $fs @@ -52,22 +52,23 @@ post_install() { - grep -q ssh $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <> "$1/etc/inetd.conf" < $1$openssh.pub - dropbearkey -y -f $1$dropbear | grep Fingerprint + [ -s "$1$dropbear" ] || continue + dropbearconvert dropbear openssh "$1$dropbear" "$1$openssh" + dropbearkey -y -f "$1$dropbear" | grep ssh > "$1$openssh.pub" + dropbearkey -y -f "$1$dropbear" | grep Fingerprint done <> $1/etc/inetd.conf <> "$1/etc/inetd.conf" < $1$openssh.pub - dropbearkey -y -f $1$dropbear | grep Fingerprint + [ -s "$1$dropbear" ] || continue + dropbearconvert dropbear openssh "$1$dropbear" "$1$openssh" + dropbearkey -y -f "$1$dropbear" | grep ssh > "$1$openssh.pub" + dropbearkey -y -f "$1$dropbear" | grep Fingerprint done <Usage: /etc/init.d/$(basename $0) [start|stop|restart]" + newline + exit 1 + ;; esac exit 0