source: lliurex-base-files/trunk/fuentes/debian/postinst @ 7265

Last change on this file since 7265 was 7265, checked in by hectorgh, 2 years ago

disabling release-upgrade

File size: 1.0 KB
Line 
1#!/bin/sh
2
3set -e
4
5# vars
6
7
8
9SKEL_LIST="_@_SKEL_LIST_@_"
10DIVERSION_TEST_FILE="/etc/skel/.profile"
11
12
13# Only for Alpha testers
14DIVERSION_ORIG_FILE="$DIVERSION_TEST_FILE.orig"
15
16
17
18case "$1" in
19        configure)
20       
21        # system groups
22        update-base-groups || true
23        grep -q "$DIVERSION_TEST_FILE"  /var/lib/dpkg/diversions && echo "[INFO] .. diversion found! ...remove it!" && dpkg-divert --remove "$DIVERSION_TEST_FILE" || true
24        [ ! -e $DIVERSION_ORIG_FILE ] || mv "$DIVERSION_ORIG_FILE" "$DIVERSION_TEST_FILE"
25   
26        ORIGINAL_UPGRADE_FILE="/etc/update-manager/release-upgrades"
27        NEW_DIVERTED_FILE="/usr/share/diverted-sessions/release-upgrades.diverted"
28        PKG="lliurex-base-files"
29
30        if [ ! -L ${ORIGINAL_UPGRADE_FILE} ] ; then
31   
32                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UPGRADE_FILE"
33                ln -s /etc/update-manager/release-upgrades.lliurex $ORIGINAL_UPGRADE_FILE
34
35        fi
36   
37   ;;
38   abort-upgrade|abort-remove|abort-deconfigure)
39   ;;
40
41   *)
42      echo "postinst called with unknown argument $1" >&2
43      exit 1
44   ;;
45esac
46
47#DEBHELPER#
48
49exit 0
Note: See TracBrowser for help on using the repository browser.