From 0a7d44948485cbdc54a4fc9da62fa3f6f7f28792 Mon Sep 17 00:00:00 2001
From: hboyet <hugo.david-boyet@savoirfairelinux.com>
Date: Wed, 17 Jun 2015 18:53:13 -0400
Subject: [PATCH] packaging: fix gpg key postinstallation

Refs #75179

Change-Id: I67de48b56c06f5dd663513ba72527e518cd6382c
---
 ...ng-deamon.postint => ring-daemon.postinst} | 44 ++-----------------
 1 file changed, 4 insertions(+), 40 deletions(-)
 rename debian/{ring-deamon.postint => ring-daemon.postinst} (75%)

diff --git a/debian/ring-deamon.postint b/debian/ring-daemon.postinst
similarity index 75%
rename from debian/ring-deamon.postint
rename to debian/ring-daemon.postinst
index 1b9d7c59cb..1f58eb29cd 100644
--- a/debian/ring-deamon.postint
+++ b/debian/ring-daemon.postinst
@@ -1,30 +1,9 @@
 #!/bin/sh
-
 set -e
 
-available()
-{
-  command -v "$1" >/dev/null/ 2>&1
-}
-
-DISTRIB_ID = $(shell grep -hPo "^ID=\K.*" /etc/*ease)
-DISTRIB_VERSION_ID = $(shell grep -hPo "^VERSION_ID=\K.*" /etc/*ease)
-
-
-case "$1" in
-
-configure)
- if [ "$RET" = true ]; then
-  if [ ! -f /etc/apt/sources.list.d/ring-nightly.list ]; then
-   cat >/etc/apt/sources.list.d/ring-nightly.list <<EOF
-
-   deb [arch=amd64] http://nightly.apt.ring.cx/$(DISTRIB_ID)_$(DISTRIB_VERSION_ID) ring main
-   EOF
-  fi
- fi
- if available apt-key
- then
-   apt-key add - >/dev/null <<EOF
+if hash apt-key
+then
+    apt-key add - >/dev/null <<EOF
 -----BEGIN PGP PUBLIC KEY BLOCK-----
 Version: GnuPG v2
 
@@ -62,20 +41,5 @@ HUFCGSHO3/kzxSlkE1PBUX3IZ8PSFijyopBnWUhlSXuyRjte8OR7Fl/Rlf0IaOD1
 4sRdAfS333T4Uifq4uOu
 =s2aQ
 -----END PGP PUBLIC KEY BLOCK-----
-
 EOF
-    fi
-  ;;
-
-  abort-upgrade|abort-remove|abort-deconfigure)
-    exit 0
-  ;;
-
-  *)
-    echo "postinst called with unknown argument \`$1'" >&2
-    exit 1
-  ;;
-
-esac
-
-exit 0
+fi
-- 
GitLab