%PDF- %PDF-
Direktori : /var/lib/dpkg/info/ |
Current File : /var/lib/dpkg/info/libvirt-bin.preinst |
#!/bin/sh # preinst script for libvirt-bin # # see: dh_installdeb(1) # As of 1.3.3-2, libvirt-bin becomes a virtual package. However, during # the transition from libvirt-bin->libvirt-daemon-system, we also want to # rename the libvirt-bin service unit to libvirtd. We have to do the # rename during the libvirt-bin preinst. # If upgrading from << 1.3.3-2, manually move the old libvirt-bin # service and socket over to libvirtd. # This can be removed after 16.04 is released (though cloud archive # may make it have to stick around longer). # Note, for cloud archive upgrades on pre-15.10 releases, we may need # to accomodate upstart installs. Here those will break on the 'mv'. set -e # summary of how this script can be called: # * <new-preinst> `install' # * <new-preinst> `install' <old-version> # * <new-preinst> `upgrade' <old-version> # * <old-preinst> `abort-upgrade' <new-version> # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in install|upgrade) if dpkg --compare-versions "$2" lt-nl "2.1.0-1ubuntu9~"; then if [ -d /run/systemd/system ]; then if deb-systemd-helper was-enabled libvirt-bin.service; then touch /etc/libvirt/TMP_libvirt-bin-enabled else touch /etc/libvirt/TMP_libvirt-bin-disabled fi deb-systemd-helper purge libvirt-bin.service fi invoke-rc.d libvirt-bin stop fi ;; # Do we need to reverse the above steps if aborting the upgrade? abort-upgrade) ;; install) ;; *) 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. # Automatically added by dh_installdeb/11.1.6ubuntu2 dpkg-maintscript-helper rm_conffile /etc/init/libvirt-bin.conf 2.5.0-3ubuntu8~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/11.1.6ubuntu2 dpkg-maintscript-helper mv_conffile /etc/cron.daily/libvirt-bin /etc/cron.daily/libvirt-daemon-system 2.1.0-1ubuntu9~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/11.1.6ubuntu2 dpkg-maintscript-helper mv_conffile /etc/dnsmasq.d-available/libvirt-bin /etc/dnsmasq.d-available/libvirt-daemon 2.1.0-1ubuntu9~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/11.1.6ubuntu2 dpkg-maintscript-helper mv_conffile /etc/default/libvirt-bin /etc/default/libvirtd 2.1.0-1ubuntu9~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/11.1.6ubuntu2 dpkg-maintscript-helper rm_conffile /etc/cron.daily/libvirt-bin 2.5.0-3ubuntu8~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/11.1.6ubuntu2 dpkg-maintscript-helper rm_conffile /etc/default/libvirt-bin 2.5.0-3ubuntu8~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/11.1.6ubuntu2 dpkg-maintscript-helper rm_conffile /etc/dnsmasq.d-available/libvirt-bin 2.5.0-3ubuntu8~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/11.1.6ubuntu2 dpkg-maintscript-helper rm_conffile /etc/apparmor.d/libvirt/TEMPLATE 2.5.0-3ubuntu8~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/11.1.6ubuntu2 dpkg-maintscript-helper rm_conffile /etc/init.d/libvirt-bin 2.5.0-3ubuntu8~ -- "$@" # End automatically added section # After Debhelper / Maintscript helpers did their preinst work we need to # untangle a special case. # Due to bug 1694159 we need to handle a potential mv from pre # 2.1.0-1ubuntu9~, but at the same time a RM from any later version. # But MV and RM conflict, in case both run (=if upgrading former LTS). # In those cases - and only if there was a custom config which is rare on # those files - we want take back the RM (which made a backup), to let the MV # be processed correctly. # This section can be dropped with libvirt-bin >=18.10 case "$1" in install|upgrade) if dpkg --compare-versions "$2" lt-nl "2.1.0-1ubuntu9~"; then for CONFFILE in /etc/cron.daily/libvirt-bin /etc/dnsmasq.d-available/libvirt-bin /etc/default/libvirt-bin; do if [ -e "$CONFFILE.dpkg-backup" ]; then mv -f "$CONFFILE.dpkg-backup" "$CONFFILE" fi done fi ;; esac exit 0