Debian Codegraph @

builds/install/arch-specific/aix/misc/postinstall.sh.in

raw
1 #!/bin/sh
2 #
3 # The contents of this file are subject to the Initial
4 # Developer's Public License Version 1.0 (the "License");
5 # you may not use this file except in compliance with the
6 # License. You may obtain a copy of the License at
7 # http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
8 #
9 # Software distributed under the License is distributed AS IS,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied.
11 # See the License for the specific language governing rights
12 # and limitations under the License.
13 #
14 # The Original Code was created by Mark O'Donohue
15 # for the Firebird Open Source RDBMS project.
16 #
17 # Copyright (c) Mark O'Donohue <[email protected]>
18 # and all contributors signed below.
19 #
20 # All Rights Reserved.
21 # Contributor(s): ______________________________________.
22 # Alex Peshkoff
23 #
24
25 # The post install script for Firebird Server
26
27
28 # Make sure the links are in place
29 if [ -z "$FirebirdInstallPrefix" ]; then
30 FirebirdInstallPrefix=@prefix@
31 fi
32
33 origDir=`pwd`
34
35 if [ "$1" = "install-embedded" ]
36 then
37 # remove server files not needed for embedded usage
38 rm -f @FB_SBINDIR@/fb_smp_server @FB_SBINDIR@/fb_smp_server
39 exit 0
40 fi
41
42 # Update /etc/services
43 newLine="@FB_SERVICE_NAME@ @FB_SERVICE_PORT@/tcp # Firebird SQL Database Remote Protocol"
44 replaceLineInFile /etc/services "$newLine" "^@FB_SERVICE_NAME@"
45
46 # add Firebird user
47 if [ $RunUser = firebird ]; then
48 addFirebirdUser
49 fi
50
51 # Create the fbmgr shell script.
52 if [ -x @FB_SBINDIR@/fbmgr.bin ]; then
53 cat > @FB_SBINDIR@/fbmgr <<EOF
54 #!/bin/sh
55 FIREBIRD=@FB_CONFDIR@
56 export FIREBIRD
57 exec @FB_SBINDIR@/fbmgr.bin \$@
58 EOF
59 fi
60
61 # Update ownership and SUID bits for files.
62 fixFilePermissions
63
64 # Install script in /etc/init.d (exact location is distro dependent)
65 installInitdScript
66
67 # Create libgds.so links
68 createLinksForBackCompatibility
69
70 # Prepare for uninstall
71 buildUninstallFile
72
73 # Update the /etc/inetd.conf or xinetd entry
74 updateInetdServiceEntry
75
76 # Get inetd to reread new init files.
77 resetInetdServer
78
79 # start the db server so we can change the password
80 startService
81
82 # Change sysdba password
83 changeDBAPassword