~ubuntu-branches/ubuntu/trusty/hyperestraier/trusty

« back to all changes in this revision

Viewing changes to debian/hyperestraier.preinst

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2006-11-14 05:28:32 UTC
  • mfrom: (2.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061114052832-0lzqzcefn8mt4yqe
Tags: 1.4.9-1.1
* Non-maintainer upload.
* High-urgency upload for RC bugfix.
* Set HOME=$(CURDIR)/junkhome when building, otherwise the package build
  will incorrectly look for headers there -- and fail when the directory
  exists and is unreadable, as happens sometimes on sudo-using
  autobuilders!

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    if test -f /etc/default/hyperestraier; then
21
21
        . /etc/default/hyperestraier
22
22
    fi
23
 
    if dpkg --compare-versions "$2" lt 0.5.7 && test -d $ROOTDIR/_node; then
 
23
    if dpkg --compare-versions "$2" lt 1.3.3 && test -d $ROOTDIR/_node; then
24
24
        # db incompatible
25
25
        cp -p /usr/bin/estcmd /var/lib/hyperestraier/estcmd.$2
26
26
        # stop node server to access db directory
27
 
        /etc/init.d/hyperestraier stop || true
 
27
        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
 
28
            invoke-rc.d hyperestraier stop || true
 
29
        else
 
30
            /etc/init.d/hyperestraier stop || true
 
31
        fi
28
32
        echo -n "node database dumping..."
29
33
        rm -rf $ROOTDIR.dpkg-tmp
30
34
        mkdir -p $ROOTDIR.dpkg-tmp/_node
31
35
        echo "$2" > $ROOTDIR.dpkg-tmp/_pkg_version
 
36
        # XXX:
 
37
        # estcmd search -dd -max -1 casket [UVSET]
32
38
        for nodedir in $ROOTDIR/_node/*
33
39
        do
34
40
          test -d $nodedir || continue