#! /bin/sh # preinst script for vzctl # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in install|upgrade) # older version installed a symbolic link, we need to remove # that - else dpkg does not install the new version if [ -L "/etc/network/if-up.d/vzifup-post" ]; then rm -f "/etc/network/if-up.d/vzifup-post" fi # move old config out of the way - newer version # use a symlink to /etc/pve/openvz if [ ! -L "/etc/vz/conf" ]; then rmdir "/etc/vz/conf" || true # try to remove empty dir if [ -e "/etc/vz/conf" ]; then if [ -e "/etc/vz/conf.org" ]; then echo "unable to backup existing configuration" exit 1 fi mv /etc/vz/conf /etc/vz/conf.org fi fi # compability mode /var/lib/vz -> /vz # ln -sT /var/lib/vz vz 2>/dev/null || true # echo "Add a link from /var/lib/vz to /vz/" ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0