Last change
on this file since 464 was
464,
checked in by jrpelegrina, 5 years ago
|
First release to Xenial
|
-
Property svn:executable set to
*
|
File size:
1.1 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | set -e |
---|
4 | |
---|
5 | |
---|
6 | #VARS |
---|
7 | SYSTEM_CONFIG_SCRIPT="/usr/bin/update-manager" |
---|
8 | SYSTEM_AUTOSTART_SCRIPT="/usr/bin/update-notifier" |
---|
9 | OUR_AUTOSTART_BINARY="/bin/true" |
---|
10 | OUR_BINARY=/usr/sbin/lliurex-up |
---|
11 | |
---|
12 | # Template for diversions |
---|
13 | ORIG_FILE="/etc/vim/vimrc" |
---|
14 | OUR_FILE="/etc/vim/vimrc.lliurex" |
---|
15 | OUR_PACKAGE="lliurex-up" |
---|
16 | |
---|
17 | case $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 | ;; |
---|
38 | esac |
---|
39 | |
---|
40 | #DEBHELPER# |
---|
41 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.