#!/bin/bash

PKGNAME=$2
if [ $1 == "7.9" ]
then
	pkgname="${PKGNAME}-3.10.0-1160.36.2.el7.x86_64.rpm"
elif [ $1 == "8.6" ]
then
	pkgname="${PKGNAME}-4.18.0-372.32.1.el8_6.x86_64.rpm"
elif [ $1 == "8.8" ]
then
	pkgname="${PKGNAME}-4.18.0-477.15.1.el8_8.x86_64.rpm"
elif [ $1 == "8.10" ]
then
	pkgname="${PKGNAME}-4.18.0-553.8.1.el8_10.x86_64.rpm"
elif [ $1 == "10.0" ]
then
	pkgname="${PKGNAME}-6.12.0-55.37.1.el10_0.x86_64.rpm"
else 
	pkgname="other"
fi

test -f /opt/nec/sysmng-soft/updates/${pkgname}
if [ $? == 0 ]
then
	echo -n ${pkgname}
else
	echo -n "none"
fi

