#!/bin/bash
#
# This script is supplied as is and is just
# an example of a script that could be used to gather
# data prior to an install.
#
# Script to check Linux enviroment
#
#
# Author:- Sharan
#
#
clear
echo "============================================"
echo "Script to check Linux enviroment"
echo "============================================"
echo
echo "---------------------------------------------------"
echo "From /etc/redhat-release:-"
echo "---------------------------------------------------"
cat /etc/redhat-release 2>&1
echo "---------------------------------------------------"
echo
echo "---------------------------------------------------"
echo "Query package version"
echo "---------------------------------------------------"
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep make
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep binutils
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep gcc
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep libaio
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep glibc-common
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep libstdc++
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep setarch
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep sysstat
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep rng-utils
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep libXtst
echo
echo "---------------------------------------------------"
echo "From /etc/passwd:-"
echo "---------------------------------------------------"
grep oemusr /etc/passwd 2>&1
echo "---------------------------------------------------"
echo
echo "---------------------------------------------------"
echo "From /etc/group:-"
echo "---------------------------------------------------"
grep oinstall /etc/group 2>&1
echo "---------------------------------------------------"
echo
echo "---------------------------------------------------"
echo "From Group:-"
echo "---------------------------------------------------"
groups oemusr 2>&1
echo "---------------------------------------------------"
echo " THE END"
echo "---------------------------------------------------"
#
# This script is supplied as is and is just
# an example of a script that could be used to gather
# data prior to an install.
#
# Script to check Linux enviroment
#
#
# Author:- Sharan
#
#
clear
echo "============================================"
echo "Script to check Linux enviroment"
echo "============================================"
echo
echo "---------------------------------------------------"
echo "From /etc/redhat-release:-"
echo "---------------------------------------------------"
cat /etc/redhat-release 2>&1
echo "---------------------------------------------------"
echo
echo "---------------------------------------------------"
echo "Query package version"
echo "---------------------------------------------------"
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep make
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep binutils
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep gcc
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep libaio
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep glibc-common
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep libstdc++
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep setarch
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep sysstat
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep rng-utils
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n"| grep libXtst
echo
echo "---------------------------------------------------"
echo "From /etc/passwd:-"
echo "---------------------------------------------------"
grep oemusr /etc/passwd 2>&1
echo "---------------------------------------------------"
echo
echo "---------------------------------------------------"
echo "From /etc/group:-"
echo "---------------------------------------------------"
grep oinstall /etc/group 2>&1
echo "---------------------------------------------------"
echo
echo "---------------------------------------------------"
echo "From Group:-"
echo "---------------------------------------------------"
groups oemusr 2>&1
echo "---------------------------------------------------"
echo " THE END"
echo "---------------------------------------------------"
No comments:
Post a Comment