+ if dpkg --compare-versions -- "$2" le "0.4.6-1"; then
+ echo "Upgrading from old onak.conf version"
+ if [ -e /etc/onak.conf.dpkg-backup -a ! -e /etc/onak.conf ]; then
+ echo "Migrating onak.conf to onak.ini"
+ # Old config file was modified; generate a new style
+ # file. onak will use the file extension to determine it's
+ # an old style config, so we need the symlink.
+ ln -s /etc/onak.conf.dpkg-backup /etc/onak.conf
+ /usr/bin/onak -c /etc/onak.conf dumpconfig /etc/onak.ini
+ rm /etc/onak.conf
+ fi
+ fi