~ubuntu-branches/debian/squeeze/firebird2.0/squeeze

« back to all changes in this revision

Viewing changes to builds/install/arch-specific/sinixz/preinstall.in

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2009-05-04 11:17:29 UTC
  • mfrom: (5.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090504111729-vrob1xe54hrvf8ij
Tags: 2.0.5.13206-0.ds2-3
change Section to database

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
# $Header: /cvsroot/firebird/firebird2/builds/install/arch-specific/sinixz/preinstall.in,v 1.1 2003/07/08 22:58:56 brodsom Exp $
4
 
#------------------------------------------------------------------------------
5
 
# $Copyright: 
6
 
# Copyright (C) Siemens Nixdorf Informationssysteme AG 1994 - 1998
7
 
# Copyright (C) Siemens AG 1998 1999
8
 
# Copyright (C) Fujitsu Siemens Computers GmbH 1999 2000
9
 
# All rights reserved
10
 
# $
11
 
#------------------------------------------------------------------------------
12
 
 
13
 
# save files which will be replaced
14
 
# don't save shell, will not be removed
15
 
 
16
 
FILELIST="
17
 
/etc/services
18
 
/etc/inetd.conf
19
 
/etc/profile
20
 
"
21
 
 
22
 
echo "saving the original modules ..."
23
 
 
24
 
if [ -f /tmp/ERROR.${PKGINST} ]
25
 
then
26
 
        rm /tmp/ERROR.${PKGINST}
27
 
fi
28
 
 
29
 
for file in ${FILELIST};do
30
 
        if [ ! -f ${PKGSAV}${file}.Z -a -f ${file} ];then
31
 
                echo ${file} | tr '\040' '\012' | cpio -pvdum ${PKGSAV}
32
 
                /usr/bin/compress ${PKGSAV}${file}
33
 
        fi
34
 
done >/tmp/ERROR.${PKGINST} 2>&1
35
 
 
36
 
# check for successful saved modules
37
 
ERR=0
38
 
for file in ${FILELIST}; do
39
 
        [ ! -s ${file} ] && continue
40
 
        if [ ! -f ${PKGSAV}${file}.Z ]; then
41
 
                if [ "$ERR" = '0' ];then
42
 
                        echo "\nAn error occured when saving original modules. \ntmp/ERROR.${PKGINST} contains the reported errors.\n\n"
43
 
                        echo "/tmp/ERROR.${PKGINST}:"
44
 
                        cat /tmp/ERROR.${PKGINST}
45
 
                        ERR=1
46
 
                fi
47
 
                ls -l $file ${PKGSAV}${file}.Z
48
 
        fi
49
 
done
50
 
 
51
 
[ "$ERR" = '0' ] && rm -f /tmp/ERROR.${PKGINST}
52
 
 
53
 
exit 0