File: postinst

package info (click to toggle)
uruk 20051129-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 484 kB
  • ctags: 6
  • sloc: sh: 1,049; makefile: 114
file content (41 lines) | stat: -rw-r--r-- 851 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh

# uruk postinst

set -e


case "$1" in
  configure)
    if test -x /etc/init.d/uruk
    then
        update-rc.d uruk start 40 S . stop 89 0 6 . >/dev/null
    #
    # Don't call init script on initial install: we have no sane rules anyway.
    # We might want to run "invoke-rc.d uruk stop" in prerm.
    #
    fi

    if test -n "$2"
    then
        # we are called with a second argument, so are upgrading from a prior
        # version: second argument holds prior version
        if test -x /usr/sbin/invoke-rc.d
        then
            invoke-rc.d uruk force-reload
        else
            /etc/init.d/uruk force-reload
        fi
    fi
    ;;

  failed-upgrade|abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing)
    ;;
  *)
    echo "postinst called with unknown argument \`$1'" >&2
    exit 1
    ;;
esac

exit 0