source: lliurex-up/trunk/fuentes/debian/postinst @ 3630

Last change on this file since 3630 was 3630, checked in by hectorgh, 4 years ago

removing pinning from lliurex-maker

  • Property svn:executable set to *
File size: 1000 bytes
Line 
1#!/bin/bash
2
3set -e
4
5
6#VARS
7SYSTEM_CONFIG_SCRIPT="/usr/bin/update-manager"
8SYSTEM_AUTOSTART_SCRIPT="/usr/bin/update-notifier"
9OUR_AUTOSTART_BINARY="/bin/true"
10OUR_BINARY=/usr/sbin/lliurex-up
11
12OUR_PACKAGE="lliurex-up"
13
14case $1 in
15
16     configure)
17        if dpkg-divert --package lliurex-up --rename --quiet --add --divert ${SYSTEM_CONFIG_SCRIPT}.real ${SYSTEM_CONFIG_SCRIPT} ; then
18                ln -fs ${OUR_BINARY} ${SYSTEM_CONFIG_SCRIPT}
19        else
20                echo "Unable to divert file \"$SYSTEM_CONFIG_SCRIPT\"" >&2
21        fi
22       
23        if dpkg-divert --package lliurex-up --rename --quiet --add --divert ${SYSTEM_AUTOSTART_SCRIPT}.real ${SYSTEM_AUTOSTART_SCRIPT} ; then
24                ln -fs ${OUR_AUTOSTART_BINARY} ${SYSTEM_AUTOSTART_SCRIPT}
25        else
26                echo "Unable to divert file \"$SYSTEM_AUTOSTART_SCRIPT\"" >&2
27        fi
28
29        if dpkg --compare-versions "$2" lt 16.04.11; then
30
31                F="/usr/share/lliurex-up/includes/etc/apt/preferences.d/lliurex-pinning"
32
33                if [ -e "$F" ]; then
34                        rm -rf $F
35                fi
36
37        fi
38
39     ;;
40esac
41
42#DEBHELPER#
43exit 0
Note: See TracBrowser for help on using the repository browser.