Debian Codegraph @

builds/install/posix-common/install.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 # Install script for FirebirdSQL database engine
26 # http://www.firebirdsql.org
27
28 parseArgs ${*}
29
30 checkInstallUser
31
32 BuildVersion=@FIREBIRD_VERSION@.@FB_BUILD_NUM@
33 PackageVersion=@FIREBIRD_PACKAGE_VERSION@
34 CpuType=@CPU_TYPE@
35
36 Version="$BuildVersion-$PackageVersion.$CpuType"
37
38 # May be put something to tty
39 if [ ! -z "$InteractiveInstall" ]
40 then
41 cat <<EOF
42
43 Firebird $Version Installation
44
45 EOF
46
47 AskQuestion "Press Enter to start installation or ^C to abort"
48 fi
49
50 # Here we are installing from a install tar.gz file
51 MANIFEST_TXT=`pwd`/manifest.txt
52 origDir=`pwd`
53
54 # Make sure we are started in correct directory
55 runAndCheckExit "test -e ${MANIFEST_TXT}"
56
57 # It's good idea not to have running firebird/interbase instances
58 checkIfServerRunning
59
60 # Make sure we have required libraries installed
61 checkLibraries
62
63 # Archive any files we find
64 archivePriorInstallSystemFiles
65
66 # Extract installation archive
67 extractBuildroot
68
69 # Update /etc/services
70 newLine="@FB_SERVICE_NAME@ @FB_SERVICE_PORT@/tcp # Firebird SQL Database Remote Protocol"
71 replaceLineInFile /etc/services "$newLine" "^@FB_SERVICE_NAME@"
72
73 # add Firebird user
74 if [ $RunUser = firebird ]; then
75 addFirebirdUser
76 fi
77
78 # Set correct fb prefix in installed files
79 setNewPrefix
80
81 # Update ownership for files.
82 fixFilePermissions
83
84 # Prepare for uninstall
85 buildUninstallFile
86
87 # Create links to libraries in system lib directory
88 createLinksInSystemLib
89
90 # Create libgds.so links
91 createLinksForBackCompatibility
92
93 # Install script in /etc/init.d (exact location is distro dependent)
94 installInitdScript
95
96 # Add sysdba and set password (use embedded access)
97 setDBAPassword
98
99 # start the RDBMS server
100 startFirebird
101
102 displayMessage "Install completed"