From 908c9c67eab553877bc5d16e2d52318d1d8ce8f9 Mon Sep 17 00:00:00 2001 From: James Page Date: Fri, 23 Nov 2012 16:07:41 +0000 Subject: Import patches-unapplied version 1.1-0ubuntu2 to ubuntu/raring-proposed Imported using git-ubuntu import. Changelog parent: 49a663c4bc1499f974cca254a9c13016c4382a1b New changelog entries: * Stop upgrades purging walinuxagent meta-data and configuration files (LP: #1079897): - d/{control,walinuxagent-data-saver.preinst}: Added walinuxagent-data-saver package to ensure that agent generated data is not lost on upgrade by diverting /usr/sbin/waagent during the upgrade process. - d/walinuxagent-data-saver.lintian-overrides: Override errors about use of dpkg-divert in this package. - d/control: Added Pre-Depends to walinuxagent on walinuxagent-data-saver. - d/prerm: Stop calling waagent --uninstall during reconfiguration and upgrade, specify files to remove manually for purge. - d/postinst: Remove divert of /usr/sbin/waagent prior to completion of package install. * d/preinst: If upgrading from package version with unmanaged waagent upstart configuration stop the agent and remove the upstart configuration. * d/upstart: Tidied description in upstart job. --- debian/preinst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 debian/preinst (limited to 'debian/preinst') diff --git a/debian/preinst b/debian/preinst new file mode 100644 index 0000000..a9573de --- /dev/null +++ b/debian/preinst @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +# If upgrading from package version +# with unmanaged upstart configuration +# and agent stop the agent and remove +# the upstart configuration. +if [ -f /etc/init/waagent.conf ]; then + stop waagent 2>&1 > /dev/null || true + rm -f /etc/init/waagent.conf +fi + +#DEBHELPER# + +exit 0 -- cgit v1.2.3