From 2f8b655fa6ec35a05da522ac35650186b89fad16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S=C3=89RIE?= Date: Fri, 18 Aug 2017 14:41:15 +0200 Subject: [PATCH] Use -e instead of -f when checking for Keyfile Why? Because we can use FD in place of regular files. Like this: root@backup:~# bkctld key test <(echo "ssh-rsa AA...") Update test : key = /dev/fd/63 --- bkctld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bkctld b/bkctld index 65d8f6a..c05f310 100755 --- a/bkctld +++ b/bkctld @@ -106,7 +106,7 @@ set_port() { set_key() { jail=$1 keyfile=$2 - if [ -f $keyfile ]; then + if [ -e $keyfile ]; then cat $keyfile > ${JAILDIR}/${jail}/${AUTHORIZED_KEYS} chmod 600 ${JAILDIR}/${jail}/${AUTHORIZED_KEYS} else