debian/preinst
author Ryan C. Gordon <icculus@icculus.org>
Wed, 31 Jul 2002 04:18:58 +0000
changeset 446 e1f7fe003b70
parent 437 2dff6a7d42b4
permissions -rw-r--r--
Fix for correct cleanup on read error.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
437
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
#! /bin/sh
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
# preinst script for libphysfs0
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
#
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
# see: dh_installdeb(1)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
set -e
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
# summary of how this script can be called:
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
#        * <new-preinst> `install'
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
#        * <new-preinst> `install' <old-version>
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
#        * <new-preinst> `upgrade' <old-version>
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
#        * <old-preinst> `abort-upgrade' <new-version>
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
#
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
# for details, see http://www.debian.org/doc/debian-policy/ or
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
# the debian-policy package
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
case "$1" in
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
    install|upgrade)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
#        if [ "$1" = "upgrade" ]
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
#        then
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
#            start-stop-daemon --stop --quiet --oknodo  \
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
#                --pidfile /var/run/libphysfs0.pid  \
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
#                --exec /usr/sbin/libphysfs0 2>/dev/null || true
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
#        fi
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
    ;;
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    27
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
    abort-upgrade)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
    ;;
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
    *)
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
        echo "preinst called with unknown argument \`$1'" >&2
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
        exit 1
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
    ;;
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
esac
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    37
# dh_installdeb will replace this with shell code automatically
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    38
# generated by other debhelper scripts.
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    40
#DEBHELPER#
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42
exit 0
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    43
2dff6a7d42b4 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44