source: lliurex-up/trunk/old/debian/postinst @ 2636

Last change on this file since 2636 was 2636, checked in by kbut, 3 years ago

add old files

  • Property svn:executable set to *
File size: 1.1 KB
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
12# Template for diversions
13ORIG_FILE="/etc/vim/vimrc"
14OUR_FILE="/etc/vim/vimrc.lliurex"
15OUR_PACKAGE="lliurex-up"
16
17case $1 in
18
19     configure)
20        if dpkg-divert --package lliurex-up --rename --quiet --add --divert ${SYSTEM_CONFIG_SCRIPT}.real ${SYSTEM_CONFIG_SCRIPT} ; then
21                ln -fs ${OUR_BINARY} ${SYSTEM_CONFIG_SCRIPT}
22        else
23                echo "Unable to divert file \"$SYSTEM_CONFIG_SCRIPT\"" >&2
24                fi
25                if dpkg-divert --package lliurex-up --rename --quiet --add --divert ${SYSTEM_AUTOSTART_SCRIPT}.real ${SYSTEM_AUTOSTART_SCRIPT} ; then
26                        ln -fs ${OUR_AUTOSTART_BINARY} ${SYSTEM_AUTOSTART_SCRIPT}
27                else
28                        echo "Unable to divert file \"$SYSTEM_AUTOSTART_SCRIPT\"" >&2
29                fi
30
31         if dpkg-divert --package ${OUR_PACKAGE} --add  --rename  --divert ${ORIG_FILE}.real ${ORIG_FILE} ; then
32                ln -fs ${OUR_FILE} ${ORIG_FILE}
33         else
34                echo "Unabe to divert file ${ORIG_FILE}"
35         fi 
36
37     ;;
38esac
39
40#DEBHELPER#
41exit 0
Note: See TracBrowser for help on using the repository browser.