Skip to content

Commit

Permalink
Added OS Security updates (for YUM only so far)
Browse files Browse the repository at this point in the history
  • Loading branch information
wimg committed Aug 8, 2021
1 parent 82cf8a0 commit 65dd38d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions snmp/osupdate
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if command -v zypper &>/dev/null ; then
# shellcheck disable=SC2086
UPDATES=$($BIN_ZYPPER $CMD_ZYPPER | $BIN_WC $CMD_WC)
if [ "$UPDATES" -ge 2 ]; then
echo $(($UPDATES-2));
echo $(($UPDATES-2)),Null;
else
echo "0,Null";
fi
Expand All @@ -47,15 +47,15 @@ elif command -v dnf &>/dev/null ; then
# shellcheck disable=SC2086
UPDATES=$($BIN_DNF $CMD_DNF | $BIN_WC $CMD_WC)
if [ "$UPDATES" -ge 1 ]; then
echo $(($UPDATES-1));
echo $(($UPDATES-1)),Null;
else
echo "0,Null";
fi
elif command -v pacman &>/dev/null ; then
# Arch
UPDATES=$($BIN_PACMAN $CMD_PACMAN | $BIN_WC $CMD_WC)
if [ "$UPDATES" -ge 1 ]; then
echo $(($UPDATES-1));
echo $(($UPDATES-1)),Null;
else
echo "0,Null";
fi
Expand All @@ -78,7 +78,7 @@ elif command -v apt-get &>/dev/null ; then
# shellcheck disable=SC2086
UPDATES=$($BIN_APT $CMD_APT | $BIN_GREP $CMD_GREP 'Inst')
if [ "$UPDATES" -ge 1 ]; then
echo "$UPDATES";
echo $(($UPDATES)),Null;
else
echo "0,Null";
fi
Expand All @@ -87,7 +87,7 @@ elif command -v pkg &>/dev/null ; then
# shellcheck disable=SC2086
UPDATES=$($BIN_PKG $CMD_PKG | $BIN_WC $CMD_WC)
if [ "$UPDATES" -ge 1 ]; then
echo "$UPDATES";
echo $(($UPDATES)),Null;
else
echo "0,Null";
fi
Expand All @@ -96,7 +96,7 @@ elif command -v apk &>/dev/null ; then
# shellcheck disable=SC2086
UPDATES=$($BIN_APK $CMD_APK | $BIN_WC $CMD_WC)
if [ "$UPDATES" -ge 2 ]; then
echo $(($UPDATES-1));
echo $(($UPDATES-1)),Null;
else
echo "0,Null";
fi
Expand Down

0 comments on commit 65dd38d

Please sign in to comment.