I think you might need to update the dimension so that you can find out whether the installation is need to update. Well I am suggesting following code which you should try and see whether it is working or not.
Code:
PackageTemplate_GetState()
{
CURRENT_STATE=$UNKNOWN
if ! [ -e /usr/local/eTablet/bin/kinglo/kinglo ]; then
CURRENT_STATE=$NOTINSTALLED
else
size=`ls -l /usr/local/eTablet/bin/kinglo/kinglo | awk '{print $5}'`
if [ $size -ne 258851 ]; then
CURRENT_STATE=$NOTUPDATED
else
CURRENT_STATE=$INSTALLED
fi
fi
}
Bookmarks