Skip to content

Commit

Permalink
Remove some deprecated build code
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMS Linux committed May 2, 2021
1 parent e8f0be0 commit cefb379
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 33 deletions.
30 changes: 30 additions & 0 deletions build/052-nems-nagios-plugins
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,33 @@ fi
echo "nagios ALL=(root) NOPASSWD: /usr/sbin/ipmi-sensors, /usr/sbin/ipmi-sel" >> /etc/sudoers
fi


# WMI Checks for Microsoft Windows hosts

# Thanks to Ryan Siegel for the original contribution in NEMS Linux 1.2.1.
# Updated for NEMS Linux 1.5 since openvas stopped distributing the package.

# Updated for NEMS Linux 1.6: Entirely deprecated the old (unsupported) wmic
# application and moved to a Python-based alternative (drop-in replacement)
# in the NEMS Linux repository.

printf "Installing check_wmi_plus... "
# Remove previous install of check_wmi_plus
if [[ -e /etc/check_wmi_plus/ ]]; then
rm -rf /etc/check_wmi_plus/
fi
# Install check_wmi_plus
cp -f /root/nems/nems-migrator/data/1.6/nagios/plugins/check_wmi_plus.pl /usr/lib/nagios/plugins/

# Copy the configs
cp -rf /root/nems/nems-migrator/data/1.6/check_wmi_plus /etc/

# Create the ini dir (which is designated in the conf below)
if [[ ! -e /etc/check_wmi_plus/check_wmi_plus.d ]]; then
mkdir /etc/check_wmi_plus/check_wmi_plus.d
fi

# Set ownership
chown -R nagios:nagios /etc/check_wmi_plus/

# End WMI Checks for Microsoft Windows hosts
31 changes: 0 additions & 31 deletions build/052-wmic

This file was deleted.

1 change: 1 addition & 0 deletions build/055-check_mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ apt-get install $repo -y chrpath
apt-get install $repo -y libkrb5-dev
apt-get install $repo -y librust-pangocairo-dev
apt-get install $repo -y libperl-dev
apt-get install $repo -y apache2-dev

# This is the full Check_MK OSE bundle

Expand Down
4 changes: 3 additions & 1 deletion nems-upgrade/patches/000001
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

# For early builds of NEMS Linux 1.5

# This patch was modified when the Samba version of WMIC was removed. Patch 15 will also be required for this patch to function.

# Reinstall monitoring-plugins to resolve stdout error and other issue with early builds of NEMS 1.5
# This is a major update and will take a while to run
if ! grep -q "PATCH-000001" /var/log/nems/patches.log; then
echo '****** PATCH-000001 *******'
echo '*** THIS IS A BIG PATCH ***'
echo 'Expect to wait a long time...'
sleep 5
/root/nems/nems-admin/build/046-plugins-prep && /root/nems/nems-admin/build/051-monitoring-plugins && /root/nems/nems-admin/build/052-nems-nagios-plugins && /root/nems/nems-admin/build/052-wmic && echo "PATCH-000001" >> /var/log/nems/patches.log && /root/nems/nems-admin/build/999-cleanup
/root/nems/nems-admin/build/046-plugins-prep && /root/nems/nems-admin/build/051-monitoring-plugins && /root/nems/nems-admin/build/052-nems-nagios-plugins && echo "PATCH-000001" >> /var/log/nems/patches.log && /root/nems/nems-admin/build/999-cleanup
else
echo "This patch is already applied."
fi
Expand Down
5 changes: 4 additions & 1 deletion nems-upgrade/patches/000011
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

# Reinstall WMIC (was missing in NEMS 1.5.2 due to NRPE Upgrade)
if ! grep -q "PATCH-000011" /var/log/nems/patches.log; then
/root/nems/nems-admin/build/052-wmic

# need to install the new wmic via patch 15 rather than the old deprecated installer
/root/nems/nems-admin/nems-upgrade/patches/000015

/root/nems/nems-admin/build/152-nagiosgraph
/root/nems/nems-admin/build/999-cleanup
echo "PATCH-000011" >> /var/log/nems/patches.log
Expand Down

0 comments on commit cefb379

Please sign in to comment.