mirror of
https://github.com/hardenedlinux/harbian-audit.git
synced 2025-07-31 01:24:58 +02:00
Fix a bug: check if the package is installed.
This commit is contained in:
parent
b4a598ad18
commit
5a9c6c83bf
@ -580,14 +580,14 @@ install_package()
|
||||
}
|
||||
|
||||
#
|
||||
# Returns if a package is installed
|
||||
# Return 0 if a package is installed
|
||||
#
|
||||
|
||||
is_pkg_installed()
|
||||
{
|
||||
PKG_NAME=$1
|
||||
if [ $OS_RELEASE -eq 2 ]; then
|
||||
if [ $(rpm -qa | grep -wc $PKG_NAME) -gt 0 ]; then
|
||||
if [ $(yum list installed | grep -c "^$PKG_NAME\.") -gt 0 ]; then
|
||||
debug "$PKG_NAME is installed"
|
||||
FNRET=0
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user