Browse Source

d/gpsd.{pre,post}{rm,inst}: drop code only needed for upgrades from oldoldstable

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
master
Christian Ehrhardt Bernd Zeimetz 2 years ago
parent
commit
302363aa14
3 changed files with 0 additions and 60 deletions
  1. +0
    -7
      debian/gpsd.postinst
  2. +0
    -10
      debian/gpsd.postrm
  3. +0
    -43
      debian/gpsd.preinst

+ 0
- 7
debian/gpsd.postinst View File

@@ -5,13 +5,6 @@ set -e

if [ "$1" = "configure" ] ; then

if dpkg --compare-versions "$2" lt '3.10-1~' ; then
# move config file back
if [ -f /etc/default/gpsd.dpkg-pre_3.10 ]; then
rm -f /etc/default/gpsd.dpkg-pre_3.10
fi
fi

echo "Creating/updating gpsd user account..."
adduser --system --ingroup dialout --home /run/gpsd \
--gecos "GPSD system user" --shell /bin/false \


+ 0
- 10
debian/gpsd.postrm View File

@@ -17,16 +17,6 @@ case "$1" in

;;


abort-install|abort-upgrade)
if dpkg --compare-versions "$2" lt '3.10-1~' ; then
# move config file back
if [ -f /etc/default/gpsd.dpkg-pre_3.10 ]; then
mv /etc/default/gpsd.dpkg-pre_3.10 /etc/default/gpsd
fi
fi
;;

remove|upgrade|failed-upgrade|disappear)
;;



+ 0
- 43
debian/gpsd.preinst View File

@@ -1,43 +0,0 @@
#!/bin/bash
# preinst script for gpsd
#
# see: dh_installdeb(1)

set -e

case "$1" in
install|upgrade)

if dpkg --compare-versions "$2" lt '3.10-1~' ; then
# move config file
if [ -f /etc/default/gpsd ]; then
cp /etc/default/gpsd /etc/default/gpsd.dpkg-pre_3.10
gpsd_hashsum="$(md5sum /etc/default/gpsd | awk '{print $1}')"
# handle upgrades from lenny -> squeeze -> wheeze -> jessie
case ${gpsd_hashsum} in
# wheezy # squeeze # lenny # lenny -> squeeze -> wheezy
5944bab322c2a6df28cf0e64f7f7ec86|4d3f8665963201dc74721ef06bf27989|d19811464c448c0852ad541be3f7fdc3|370942c4da267af152f6c3178137e60f)
rm -f /etc/default/gpsd
;;
esac
fi
fi
;;

abort-upgrade)
;;

*)
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.

#DEBHELPER#

exit 0



Loading…
Cancel
Save