[Pkg-ganeti-devel] [ganeti] 23/29: prerm script fixes
Apollon Oikonomopoulos
apoikos at moszumanska.debian.org
Fri Mar 7 10:15:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
apoikos pushed a commit to branch master
in repository ganeti.
commit fec0906eacbf8cb6d325eddeb617349e511b4dd4
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date: Thu Mar 6 17:29:54 2014 +0200
prerm script fixes
• Do not exit before any debhelper snippets run.
• Use test -ef instead of readlink (dash built-in).
• Check /usr/lib/ganeti/default instead of /etc/ganeti/lib.
• Fix typos (!= "remove" -> = "remove").
---
debian/ganeti-VER.prerm | 33 +++++++++++++++------------------
debian/ganeti-haskell-VER.prerm | 33 +++++++++++++++------------------
debian/ganeti-htools-VER.prerm | 33 +++++++++++++++------------------
3 files changed, 45 insertions(+), 54 deletions(-)
diff --git a/debian/ganeti-VER.prerm b/debian/ganeti-VER.prerm
index 560cdbf..a6d526b 100644
--- a/debian/ganeti-VER.prerm
+++ b/debian/ganeti-VER.prerm
@@ -2,26 +2,23 @@
set -e
-if [ "$1" != "remove" ]; then
- exit 0;
-fi
-
-. /usr/share/debconf/confmodule
+if [ "$1" = "remove" ]; then
+ . /usr/share/debconf/confmodule
-target=$(readlink /etc/ganeti/lib || true)
-if [ "$target" = "/usr/lib/ganeti/VER" ]; then
- db_version 2.0
- db_fset ganeti-VER/abort-removal seen false
- db_subst ganeti-VER/abort-removal version VER
- db_subst ganeti-VER/abort-removal package ganeti-VER
- db_input critical ganeti-VER/abort-removal
- db_go
- db_get ganeti-VER/abort-removal
+ if [ /usr/lib/ganeti/default -ef /usr/lib/ganeti/VER ]; then
+ db_version 2.0
+ db_fset ganeti-VER/abort-removal seen false
+ db_subst ganeti-VER/abort-removal version VER
+ db_subst ganeti-VER/abort-removal package ganeti-VER
+ db_input critical ganeti-VER/abort-removal
+ db_go
+ db_get ganeti-VER/abort-removal
- if [ "$RET" = "true" ]; then
- echo "Aborting removal on user request"
- exit 1;
- fi
+ if [ "$RET" = "true" ]; then
+ echo "Aborting removal on user request"
+ exit 1;
+ fi
+ fi
fi
#DEBHELPER#
diff --git a/debian/ganeti-haskell-VER.prerm b/debian/ganeti-haskell-VER.prerm
index 2e94f18..a34e406 100644
--- a/debian/ganeti-haskell-VER.prerm
+++ b/debian/ganeti-haskell-VER.prerm
@@ -2,26 +2,23 @@
set -e
-if [ "$1" != "remove" ]; then
- exit 0;
-fi
-
-. /usr/share/debconf/confmodule
+if [ "$1" = "remove" ]; then
+ . /usr/share/debconf/confmodule
-target=$(readlink /etc/ganeti/lib || true)
-if [ "$target" = "/usr/lib/ganeti/VER" ]; then
- db_version 2.0
- db_fset ganeti-haskell-VER/abort-removal seen false
- db_subst ganeti-haskell-VER/abort-removal version VER
- db_subst ganeti-haskell-VER/abort-removal package ganeti-haskell-VER
- db_input critical ganeti-haskell-VER/abort-removal
- db_go
- db_get ganeti-haskell-VER/abort-removal
+ if [ /usr/lib/ganeti/default -ef /usr/lib/ganeti/VER ]; then
+ db_version 2.0
+ db_fset ganeti-haskell-VER/abort-removal seen false
+ db_subst ganeti-haskell-VER/abort-removal version VER
+ db_subst ganeti-haskell-VER/abort-removal package ganeti-haskell-VER
+ db_input critical ganeti-haskell-VER/abort-removal
+ db_go
+ db_get ganeti-haskell-VER/abort-removal
- if [ "$RET" = "true" ]; then
- echo "Aborting removal on user request"
- exit 1;
- fi
+ if [ "$RET" = "true" ]; then
+ echo "Aborting removal on user request"
+ exit 1;
+ fi
+ fi
fi
#DEBHELPER#
diff --git a/debian/ganeti-htools-VER.prerm b/debian/ganeti-htools-VER.prerm
index 80e876e..86e912c 100644
--- a/debian/ganeti-htools-VER.prerm
+++ b/debian/ganeti-htools-VER.prerm
@@ -2,26 +2,23 @@
set -e
-if [ "$1" != "remove" ]; then
- exit 0;
-fi
-
-. /usr/share/debconf/confmodule
+if [ "$1" = "remove" ]; then
+ . /usr/share/debconf/confmodule
-target=$(readlink /etc/ganeti/lib || true)
-if [ "$target" = "/usr/lib/ganeti/VER" ]; then
- db_version 2.0
- db_fset ganeti-htools-VER/abort-removal seen false
- db_subst ganeti-htools-VER/abort-removal version VER
- db_subst ganeti-htools-VER/abort-removal package ganeti-htools-VER
- db_input critical ganeti-htools-VER/abort-removal
- db_go
- db_get ganeti-htools-VER/abort-removal
+ if [ /usr/lib/ganeti/default -ef /usr/lib/ganeti/VER ]; then
+ db_version 2.0
+ db_fset ganeti-htools-VER/abort-removal seen false
+ db_subst ganeti-htools-VER/abort-removal version VER
+ db_subst ganeti-htools-VER/abort-removal package ganeti-htools-VER
+ db_input critical ganeti-htools-VER/abort-removal
+ db_go
+ db_get ganeti-htools-VER/abort-removal
- if [ "$RET" = "true" ]; then
- echo "Aborting removal on user request"
- exit 1;
- fi
+ if [ "$RET" = "true" ]; then
+ echo "Aborting removal on user request"
+ exit 1;
+ fi
+ fi
fi
#DEBHELPER#
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git
More information about the Pkg-ganeti-devel
mailing list