Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up

Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More

  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4405Themes and Skins13Add-ons757Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
Other Tutorials And HOWTOs Configuring e-Mail Notifications in Nagios Core…
0.0 (0)
171.1K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Yoann LAMY (7)deskwork_itunes142 (4)Chad Columbus (3)Marcin Bednarski (3)Julien DESMAREST (3)
See More
Newest Contributors
signalgrid (1)Sanna Glue (2)fisherrs (1)smolinux (1)juanfertor (1)
See More

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home > JorgeGV
J

JorgeGV

@jorgegv

User Stats

Member Since: November 9, 2017

Favorites0

Views

Projects0

No Projects Found
check_ubuntu_packages.patch

Patch in universal diff for easier patching

Patch: --- check_debian_packages 2017-11-09 13:17:39.528526651 +0100 +++ check_ubuntu_packages 2017-11-09 13:27:51.926197425 +0100 @@ -109,7 +109,7 @@ sub run_apt { my ($pkg,$ver,$type,$release); open APT,"$CMD_APT 2>&1|" or exit_unknown($!); - my (%stable,%security,%other); + my (%updates,%backports,%security,%other); while () { print "APT: $_" if $DEBUG; exit_unknown($_) if /(Could not open lock file)|(Could not get lock)/; @@ -117,12 +117,16 @@ ($pkg,$ver,$release) = /Inst (.*?) .*((.*?) (.*?))/; print "$_npkg=$pkg ver=$ver release=$releasen" if $DEBUG; die "$_n" unless defined $release; - $release = 'stable' - if $release =~ /stable$/ && $release !~/security/i; + $release = 'updates' + if $release =~ /updates/; + $release = 'backports' + if $release =~ /backports/; $release = 'security' if $release =~ /security/i; - if ($release eq 'stable') { - $stable{$pkg} = $ver; + if ($release eq 'updates') { + $updates{$pkg} = $ver; + } elsif ($release eq 'backports') { + $backports{$pkg} = $ver; } elsif ($release eq 'security') { $security{$pkg} = $ver; } else { @@ -134,9 +138,10 @@ if (keys (%security)) { $RET = 'CRITICAL'; add_info($info,'security',%security); - } elsif (keys (%other) or keys(%stable)) { - $RET = 'WARNING'; - add_info($info,'stable',%stable); + } elsif (keys (%other) or keys(%updates)) { + $RET = 'WARNING'; + add_info($info,'updates',%updates); + add_info($info,'backports',%backports) if keys %backports; add_info($info,'other',%other) if keys %other; } print "$RET: $infon"; HOW TO PATCH: - Save the previous diff to file check_ubuntu_packages.patch - Put check_debian_packages in the same directory as this patch - Execute: patch check_debian_packages check_ubuntu_packages.patch -o check_ubuntu_packages

Reviewed 8 years ago

No Favorites Found

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile