Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Packaging/preinst script and version checking

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
graysky
Posts: 495
Joined: 2008-10-10 20:58

Packaging/preinst script and version checking

#1 Post by graysky »

How can I use the preinst script to check to see if the version that is installed older than the version trying to be installed and if so, take an action?

For example: if the software installed is at a version less than 6.14 then take an action, else return 0?

preinst:

Code: Select all

set -e
case "$1" in
  install|upgrade)
  # if version installed <6.14 then do something else return 0
    ;;

  abort-upgrade)
    /bin/true
    ;;

  *)
    echo "preinst called with unknown argument \`$1'" >&2
    exit 1
    ;;
esac
exit 0

Post Reply