From 53c9992786fcfdc20ab9f5d8b622bdb0f8431e25 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 15 Mar 2016 09:05:38 +0100 Subject: [PATCH] Drop init scripts dependency from sshd-keygen (#1317722) --- sshd-keygen | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/sshd-keygen b/sshd-keygen index a1143f3..78da730 100644 --- a/sshd-keygen +++ b/sshd-keygen @@ -6,8 +6,22 @@ # variable. AUTOCREATE_SERVER_KEYS="RSA ECDSA ED25519" -# source function library -. /etc/rc.d/init.d/functions +if [ -f /etc/rc.d/init.d/functions ]; then + # source function library + . /etc/rc.d/init.d/functions +else + # minimal implimantation of success and failure function + success() + { + echo -en $"[ OK ]\r" + return 0 + } + failure() + { + echo -en $"[FAILED]\r" + return 1 + } +fi # Some functions to make the below more readable KEYGEN=/usr/bin/ssh-keygen