Friday, January 25, 2019

lsb_release package install with script.

[root@desk-03 tmp]# cat lsb_pkginstall.sh

#!/bin/bash

FILENAME=/usr/bin/lsb_release

if [ ! -f  $FILENAME ]

then

echo "Installing lsb_release on the system please wait....."

yum repolist > /dev/null 2>&1  ; sleep 3 ;  yum -y install redhat-lsb-core > /dev/null 2>&1

echo `ls -l /usr/bin/lsb_release`

else

echo "lsb_release command exists nothing changed"

fi


Happy Scripting!


Disclaimer: This is for my reference only - Use at your own discretion.

No comments: