]>
git.proxmox.com Git - vzctl.git/blob - debian/vzctl.preinst
2 # preinst script for vzctl
4 # see: dh_installdeb(1)
8 # summary of how this script can be called:
9 # * <new-preinst> `install'
10 # * <new-preinst> `install' <old-version>
11 # * <new-preinst> `upgrade' <old-version>
12 # * <old-preinst> `abort-upgrade' <new-version>
14 # for details, see http://www.debian.org/doc/debian-policy/ or
15 # the debian-policy package
20 # older version installed a symbolic link, we need to remove
21 # that - else dpkg does not install the new version
22 if [ -L "/etc/network/if-up.d/vzifup-post" ]; then
23 rm -f "/etc/network/if-up.d/vzifup-post"
26 # move old config out of the way - newer version
27 # use a symlink to /etc/pve/openvz
28 if [ ! -L "/etc/vz/conf" ]; then
29 rmdir "/etc/vz/conf" || true
# try to remove empty dir
30 if [ -e "/etc/vz/conf" ]; then
31 if [ -e "/etc/vz/conf.org" ]; then
32 echo "unable to backup existing configuration"
35 mv /etc
/vz
/conf
/etc
/vz
/conf.org
39 # compability mode /var/lib/vz -> /vz
40 # ln -sT /var/lib/vz vz 2>/dev/null || true
41 # echo "Add a link from /var/lib/vz to /vz/"
46 echo "preinst called with unknown argument \`$1'" >&2
51 # dh_installdeb will replace this with shell code automatically
52 # generated by other debhelper scripts.