Commit 40d3191b authored by Elijah Grubb's avatar Elijah Grubb

Updated analyze script for proper spacing and apk usage

parent 90eaccec
......@@ -128,17 +128,17 @@ if [ -n "$dist" ]; then
fi
;;
alpine)
if [ -z "$pkgtool" -a -f /sbin/apk ]; then
pkgtool=/sbin/apk
pkgtool=/sbin/apk
else
pkgtool=`which apk`
basepkgtool=`which apk`
fi
if [ -n "$pkgtool" ]; then
basepkgtype='apk'
fi
;;
if [ -z "$pkgtool" -a -f /sbin/apk ]; then
pkgtool=/sbin/apk
pkgtool=/sbin/apk
else
pkgtool=`which apk`
basepkgtool=`which apk`
fi
if [ -n "$pkgtool" ]; then
basepkgtype='apk'
fi
;;
*)
if [ -z "$pkgtool" ]; then
if [ -f /usr/bin/apt-get ]; then
......@@ -226,11 +226,10 @@ elif [ -n "$basepkgtype" -a "$basepkgtype" = "rpm" ]; then
fi
elif [ -n "$basepkgtype" -a "$basepkgtype" = "apk" ]; then
SSHD_PACKAGE=openssh
apk update
apk add openssh-server | grep -iq OK >/dev/null 2>&1
apk info | grep -iq openssh-server >/dev/null 2>&1
if [ $? -eq 0 ]; then
HAS_SSHD=1
SSHD_PACKAGE=openssh-server
HAS_SSHD=1
SSHD_PACKAGE=openssh-server
fi
fi
......@@ -266,18 +265,17 @@ elif [ -n "$basepkgtype" -a "$basepkgtype" = "rpm" ]; then
fi
fi
elif [ -n "$basepkgtype" -a "$basepkgtype" = "apk" ]; then
apk update
apk add rsyslog | grep -iq OK >/dev/null 2>&1
apk info | grep -iq rsyslog >/dev/null 2>&1
if [ $? -eq 0 ]; then
SYSLOG_PACKAGE=rsyslog
HAS_SYSLOG=1
SYSLOG_PACKAGE=rsyslog
HAS_SYSLOG=1
fi
if [ $HAS_SYSLOG -eq 0 ]; then
apk add syslog=ng | grep -iq OK >/dev/null 2>&1
if [ $? -eq 0 ]; then
SYSLOG_PACKAGE=syslog-ng
HAS_SYSLOG=1
fi
apk info | grep -iq syslog-ng >/dev/null 2>&1
if [ $? -eq 0 ]; then
SYSLOG_PACKAGE=syslog-ng
HAS_SYSLOG=1
fi
fi
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment