2005-04-29 20:16:46 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2008-05-07 18:34:47 +02:00
|
|
|
# The contents of this file are subject to the Initial
|
|
|
|
# Developer's Public License Version 1.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
|
|
|
# http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed AS IS,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing rights
|
|
|
|
# and limitations under the License.
|
|
|
|
#
|
|
|
|
# The Original Code was created by Mark O'Donohue
|
|
|
|
# for the Firebird Open Source RDBMS project.
|
|
|
|
#
|
|
|
|
# Copyright (c) Mark O'Donohue <mark.odonohue@ludwig.edu.au>
|
|
|
|
# and all contributors signed below.
|
|
|
|
#
|
|
|
|
# All Rights Reserved.
|
|
|
|
# Contributor(s): ______________________________________.
|
|
|
|
# Alex Peshkoff
|
2005-04-29 20:16:46 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
# This script allows the user to change the link on classic for the
|
|
|
|
# client library from
|
|
|
|
#
|
|
|
|
# a) libfbembed.so original classic direct connection
|
|
|
|
# b) libfbclient.so multithreaded client connection
|
|
|
|
#
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
# quitIfRealFile
|
2005-08-16 12:04:13 +02:00
|
|
|
# Quit if library is real file, not link somewhere
|
2005-04-29 20:16:46 +02:00
|
|
|
|
|
|
|
quitIfRealFile() {
|
|
|
|
|
|
|
|
fileToCheck=$1
|
|
|
|
|
|
|
|
# Don't worry about symbolic links
|
|
|
|
if [ -L $fileToCheck ]
|
|
|
|
then
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f $fileToCheck ]
|
|
|
|
then
|
|
|
|
echo "The file $fileToCheck is a real file not just a link to an "
|
|
|
|
echo "existing file. It therefore may be from a"
|
|
|
|
echo "previous firebird or InterBase(r) installation"
|
|
|
|
echo "You will need to manually check the status of this file"
|
|
|
|
echo "and remove it before running this script again"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
# printStatus
|
|
|
|
|
|
|
|
printStatus() {
|
|
|
|
printStatus=`ls -l @libdir@/libgds.so | sed 's@^.* /usr@/usr@'`
|
|
|
|
echo $printStatus
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#= Main ====================================================================
|
|
|
|
|
|
|
|
|
|
|
|
cat <<EOF
|
|
|
|
For classic server there are two optional backward compatible client libraries.
|
|
|
|
These are libfbclient.so and libfbembed.so.
|
|
|
|
|
|
|
|
libfbclient.so) enables your client to be multithreaded but must connect to a
|
|
|
|
database via a server.
|
|
|
|
libfbembed.so) allows the client to directly open the database file, but does
|
|
|
|
not support multithreaded access
|
|
|
|
|
|
|
|
Your current setting is:
|
|
|
|
EOF
|
|
|
|
printStatus
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
quitIfRealFile @libdir@/libgds.so
|
|
|
|
quitIfRealFile @libdir@/libgds.so.0
|
|
|
|
|
|
|
|
|
|
|
|
AskQuestion "Which option would you like to choose (client|embed|remove) [client] " "client"
|
|
|
|
|
|
|
|
case $Answer in
|
|
|
|
embed)
|
|
|
|
createLinksForBackCompatibility libfbembed.so
|
|
|
|
;;
|
|
|
|
client)
|
|
|
|
createLinksForBackCompatibility libfbclient.so
|
|
|
|
;;
|
|
|
|
remove)
|
2005-08-16 12:04:13 +02:00
|
|
|
removeLinksForBackCompatibility
|
2005-04-29 20:16:46 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unknown option $Answer chosen"
|
|
|
|
;;
|
|
|
|
esac
|