Hello you can use the next script to check version for:
Debian
Suse
Red Hat

You can modify for other distributions...

#!/bin/bash
######################################
# Identify and show the Linux Version
# Created by Esteban Monge
# emo...@gbm.net
# Version: 0.1
# 07/01/12
######################################

FILE=/etc/debian_version
if [ -f $FILE ]
then
 echo "Debian GNU/Linux "`cat /etc/debian_version`" con el kernel "`uname -r`
else
 FILE=/etc/system-release
 if [ -f $FILE ]
 then
  echo `cat /etc/system-release`" con el kernel "`uname -r`
 else
  FILE=/etc/SuSE-release
  if [ -f $FILE ]
  then
    echo `cat /etc/SuSE-release`" KERNEL = "`uname -r`
  else
   FILE=/etc/redhat-release
   if [ -f $FILE ]
   then
    echo `cat /etc/redhat-release`" con el kernel "`uname -r`
   else
    echo "Otro sabor de Linux "`uname -rmvo`
   fi
  fi
 fi
fi



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to