File: omniorb-nameserver.postinst

package info (click to toggle)
omniorb-dfsg 4.2.2-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 14,628 kB
  • sloc: cpp: 109,677; python: 24,939; ansic: 14,136; sh: 2,743; makefile: 96
file content (38 lines) | stat: -rw-r--r-- 924 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
29
30
31
32
33
34
35
36
37
38
#! /bin/sh
# postinst script for omniorb-nameserver

set -e

LIBDIR=/var/lib/omniorb/
OLDLIBDIR=/var/lib/omniorb4/
DBFILE=omninames-$(uname -n).log
BAKFILE=omninames-$(uname -n).bak


case "$1" in
    configure)
        # Only move the DB if we haven't been installed before.
        if [ x$2 = x ]; then
            test -d $OLDLIBDIR -a ! -f $LIBDIR/$DBFILE \
                && mv $OLDLIBDIR/$DBFILE $LIBDIR/$DBFILE
            test -d $OLDLIBDIR -a ! -f $LIBDIR/$BAKFILE \
                && mv $OLDLIBDIR/$BAKFILE $LIBDIR/$BAKFILE
            test -d $OLDLIBDIR \
                && rmdir $OLDLIBDIR || true
        fi
        ;;
    abort-upgrade|abort-remove|abort-deconfigure)
        true
        ;;
    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1

esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0