]>
Commit | Line | Data |
---|---|---|
4d916382 DS |
1 | #!/bin/bash -e |
2 | ||
3 | . /usr/share/debconf/confmodule | |
4 | ||
5 | if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi | |
6 | ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"} | |
7 | ||
8 | # prerm remove | |
9 | # old-prerm upgrade new-version | |
10 | # new-prerm failed-upgrade old-version | |
11 | # conflictor's-prerm remove in-favour package new-version | |
12 | # deconfigured's-prerm deconfigure in-favour package-being-installed version removing conflicting-package | |
13 | case $1 in | |
14 | remove|upgrade) | |
15 | # Trying to prevents the user from cutting his network connection if | |
16 | # one or more servers seem to be started. | |
17 | if [ -n "`ls /var/run/quagga/*.pid 2>/dev/null`" ]; then | |
18 | db_fset quagga/really_stop seen false || true | |
19 | db_input high quagga/really_stop || true | |
20 | db_go || true | |
21 | db_get quagga/really_stop || true | |
22 | if [ "$RET" = "false" ]; then | |
23 | db_stop | |
24 | echo "*** As requested via Debconf, the Quagga daemon will not stop! ***" 1>&2 | |
25 | exit 1 | |
26 | fi | |
27 | fi | |
28 | ;; | |
29 | ||
30 | failed-upgrade) | |
31 | # If quagga/really_stop was negated then this script exits with return | |
32 | # code 1 and is called again with "failed-upgrade". Well, exit again. | |
33 | exit 1 | |
34 | ;; | |
35 | ||
36 | esac | |
37 | ||
38 | #DEBHELPER# |