summaryrefslogtreecommitdiff
path: root/debian/preinst
diff options
context:
space:
mode:
authorJames Page <james.page@ubuntu.com>2012-11-23 16:07:41 +0000
committerusd-importer <ubuntu-server@lists.ubuntu.com>2012-11-26 13:03:31 +0000
commit908c9c67eab553877bc5d16e2d52318d1d8ce8f9 (patch)
tree769265fa969b203d4406bc44cd34f7c689f4f3ac /debian/preinst
parent49a663c4bc1499f974cca254a9c13016c4382a1b (diff)
downloadvyos-walinuxagent-908c9c67eab553877bc5d16e2d52318d1d8ce8f9.tar.gz
vyos-walinuxagent-908c9c67eab553877bc5d16e2d52318d1d8ce8f9.zip
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.
Diffstat (limited to 'debian/preinst')
-rw-r--r--debian/preinst16
1 files changed, 16 insertions, 0 deletions
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