# In case of error (error in configuration file or model bug), the
# configuration file is left as is.

. /usr/share/debconf/confmodule

db_get  %PACKAGE%/auto-upgrade-config

# testing perl is required to avoid problem in embedded environments
if [ "$RET" = true ] && [ -x "/usr/bin/perl" ] && [ -x "/usr/bin/cme" ] 
then
	cme %COMMAND% %APPNAME% -create -backup dpkg-old -try-app-as-model %OPTION% || \
	echo "WARNING: upgrade with cme failed: Run 'sudo cme migrate %APPNAME% %OPTION%'."
fi
