File: buildbot.preinst

package info (click to toggle)
buildbot 4.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 20,524 kB
  • sloc: python: 169,990; sh: 1,204; makefile: 329; javascript: 119; xml: 16
file content (28 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (5)
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
#! /bin/sh
# ex: et sw=4 ts=4 sts=4

set -e

if [ "$1" = install ] || [ "$1" = upgrade ]; then
    case "$2" in
    0.*)
        if [ -f /etc/init.d/buildmaster ]; then
            # remove and unregister the old init script
            rm -f /etc/init.d/buildmaster
            update-rc.d buildmaster remove >/dev/null || true
        fi

        # Automatic upgrade from 0.8.x is not possible.
        # Identify all instances in /var/lib/buildbot/masters accordingly
        for instance in /var/lib/buildbot/masters/*; do
            if ! [ -d "$instance" ]; then
                continue
            fi
            touch "$instance/.no-auto-upgrade"
        done
    esac
fi

#DEBHELPER#

exit 0