Another try

This commit is contained in:
Michael Stanclift 2020-05-30 21:29:01 -05:00
parent b8359ae505
commit 210cd53a1c

View File

@ -598,7 +598,7 @@ function detect_sshkeygen {
MESSAGE="Checking for SSH-KEYGEN" MESSAGE="Checking for SSH-KEYGEN"
echo_stat echo_stat
if hash ssh-keygen 2>/dev/null if hash ssh-keygen >/dev/null 2>&1
then then
echo_good echo_good
else else
@ -608,7 +608,7 @@ function detect_sshkeygen {
MESSAGE="Attempting to Compensate" MESSAGE="Attempting to Compensate"
echo_info echo_info
if hash dropbearkey 2>/dev/null if hash dropbearkey >/dev/null 2>&1
then then
MESSAGE="Using DROPBEARKEY Instead" MESSAGE="Using DROPBEARKEY Instead"
echo_info echo_info
@ -624,16 +624,15 @@ function detect_sshkeygen {
## Detect Package Manager ## Detect Package Manager
function distro_check { function distro_check {
if hash apt-get 2>/dev/null if hash apt-get
then then
PKG_MANAGER="apt-get" PKG_INSTALL="sudo apt-get --yes --no-install-recommends --quiet install"
PKG_INSTALL="sudo ${PKG_MANAGER} --yes --no-install-recommends --quiet install" elif hash rpm
elif hash rpm 2>/dev/null
then then
if hash dnf 2>/dev/null if hash dnf
then then
PKG_MANAGER="dnf" PKG_MANAGER="dnf"
elif hash yum 2>/dev/null elif hash yum
then then
PKG_MANAGER="yum" PKG_MANAGER="yum"
else else
@ -654,7 +653,7 @@ function detect_ssh {
MESSAGE="Checking for SSH Client on $HOSTNAME" MESSAGE="Checking for SSH Client on $HOSTNAME"
echo_stat echo_stat
if hash ssh 2>/dev/null if hash ssh
then then
echo_good echo_good
else else
@ -664,14 +663,14 @@ function detect_ssh {
MESSAGE="Installing SSH" MESSAGE="Installing SSH"
echo_stat echo_stat
${PKG_INSTALL} ssh 2>/dev/null ${PKG_INSTALL} ssh >/dev/null 2>&1
error_validate error_validate
fi fi
MESSAGE="Checking for RSYNC Client on $HOSTNAME" MESSAGE="Checking for RSYNC Client on $HOSTNAME"
echo_stat echo_stat
if hash rsync 2>/dev/null if hash rsync
then then
echo_good echo_good
else else
@ -681,7 +680,7 @@ function detect_ssh {
MESSAGE="Installing RSYNC" MESSAGE="Installing RSYNC"
echo_stat echo_stat
${PKG_INSTALL} rsync 2>/dev/null ${PKG_INSTALL} rsync >/dev/null 2>&1
error_validate error_validate
fi fi
} }