3 E_RPM_ALREADY_INSTALLED=2
7 echo "find pakcage $1" >> /tmp/rpmscriptlog
10 echo $CURDIR >> /tmp/rpmscriptlog
13 echo ">>$DEBUG" >> /tmp/rpmscriptlog
17 DEBUG="Usage: query_package.sh PKG_FILE";debug
22 echo "pkg name = $PKGNAME" >> /tmp/rpmscriptlog
24 PKG_LOG_DIR=/var/pkgmgr/$PKGNAME
25 if [ ! -d $PKG_LOG_DIR ];then
26 DEBUG="$PKG_LOG_DIR not exist -> mkdir(ok)";debug
30 if [ -f $PKGNAME ]; then
37 echo "retval = $retval" >> /tmp/rpmscriptlog
39 if [ $retval -ne 0 ];then
40 DEBUG="pakcage not exist";debug
42 exit $E_RPM_NOT_INSTALLED
44 exit $E_RPM_ALREADY_INSTALLED