From e992c9a06c60563ab3bad6b892d4f33e867c2a9d Mon Sep 17 00:00:00 2001 From: GARDAIS Jeremy Date: Mon, 2 May 2016 10:14:08 +0200 Subject: [PATCH] mac_install: ensure to test /etc/ssh for el capitan. --- install_backuppc_linux_mac.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install_backuppc_linux_mac.sh b/install_backuppc_linux_mac.sh index c0bbf1a..9417b0b 100755 --- a/install_backuppc_linux_mac.sh +++ b/install_backuppc_linux_mac.sh @@ -75,8 +75,11 @@ function getMyHostKey() { 'Darwin') hostkey="/etc/ssh_host_rsa_key.pub" if [ ! -f "${hostkey}" ]; then - printf '\e[1;31m%-6s\e[m' "Impossible de trouver la clef ssh publique ce cette machine, installation annulée." - return "$ERROR" + hostkey="/etc/ssh/ssh_host_rsa_key.pub" + if [ ! -f "${hostkey}" ]; then + printf '\e[1;31m%-6s\e[m' "Impossible de trouver la clef ssh publique ce cette machine, installation annulée." + return "$ERROR" + fi fi ;; 'Linux')