ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ#!/usr/bin/perl -w ################################### # # Check the state of mount points # written by Martin Scharm # see http://binfalse.de # ################################### use warnings; use strict; use Getopt::Long qw(:config no_ignore_case); use lib '/usr/lib64/nagios/plugins'; use utils qw(%ERRORS); my $MOUNT = undef; my $TYPE = undef; sub how_to { print "USAGE: $0\n\t-m MOUNTPOINT\twich mountpoint to check\n\t[-t TYPE]\toptionally check whether it's this kind of fs-type\n\n"; } GetOptions ( 'm=s' => \ $MOUNT, 'mountpoint=s' => \ $MOUNT, 't=s' => \ $TYPE, 'type=s' => \ $TYPE ); unless (defined ($MOUNT)) { print "Please define mountpoint\n\n"; how_to; exit $ERRORS{'CRITICAL'}; } my $erg = `/bin/mount | /bin/grep $MOUNT`; if ($erg) { if (defined ($TYPE)) { if ($erg =~ m/type $TYPE /) { print $MOUNT . " is mounted! Type is " . $TYPE . "\n"; exit $ERRORS{'OK'}; } else { print $MOUNT . " is mounted! But type is not " . $TYPE . "\n"; exit $ERRORS{'WARNING'}; } } print $MOUNT . " is mounted!\n"; exit $ERRORS{'OK'}; } else { print $MOUNT . " is not mounted!\n"; exit $ERRORS{'CRITICAL'}; }