8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 03:23:04 +01:00

1. Deeper integration between super and classic setup.

2. Script to switch between classic and superclassic modes.
3. Changed lisences from LGPL to IDPL (with Mark's agreement)
This commit is contained in:
alexpeshkoff 2008-05-07 16:34:47 +00:00
parent c874454cf9
commit 2b382f606b
38 changed files with 962 additions and 1245 deletions

View File

@ -1,30 +1,24 @@
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
# 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): ______________________________________.
#
# Contributor(s):
#
#
ROOT=..

View File

@ -1,36 +1,26 @@
#!/bin/sh
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
#
# 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
#
# Script to copy install files from the build/transport area
@ -129,15 +119,14 @@ copyFiles() {
mkdir -p $TargetDir@libdir@
mkdir -p $TargetDir/usr/include
cp -f $BuiltFBDir/bin/fb_inet_server $DestDir/bin/fb_inet_server
cp -f $BuiltFBDir/bin/fb_smp_server $DestDir/bin/fb_smp_server
cp -f $BuiltFBDir/bin/fb_inet_server $DestDir/bin/fb_inet_server
cp -f $BuiltFBDir/bin/fb_smp_server $DestDir/bin/fb_smp_server
cp -f $BuiltFBDir/bin/fbguard $DestDir/bin/fbguard
cp $BuiltFBDir/bin/gbak $DestDir/bin/gbak
cp $BuiltFBDir/bin/gdef $DestDir/bin/gdef
cp $BuiltFBDir/bin/gds_drop $DestDir/bin/gds_drop
copyIfExists $BuiltFBDir/bin/fb_lock_mgr $DestDir/bin/fb_lock_mgr
copyIfExists $BuiltFBDir/bin/fb_lock_print $DestDir/bin/fb_lock_print
copyIfExists $BuiltFBDir/bin/gds_pipe $DestDir/bin/gds_pipe
cp $BuiltFBDir/bin/gfix $DestDir/bin/gfix
cp $BuiltFBDir/bin/gpre $DestDir/bin/gpre
cp $BuiltFBDir/bin/gsec $DestDir/bin/gsec
@ -145,7 +134,6 @@ copyFiles() {
copyIfExists $BuiltFBDir/bin/gsplit $DestDir/bin/gsplit
cp $BuiltFBDir/bin/gstat $DestDir/bin/gstat
copyIfExists $BuiltFBDir/bin/fbsvcmgr $DestDir/bin/fbsvcmgr
copyIfExists $BuiltFBDir/bin/isc4.gbak $DestDir/bin/isc4.gbak
cp $BuiltFBDir/bin/isql $DestDir/bin/isql
cp $BuiltFBDir/bin/qli $DestDir/bin/qli
@ -153,6 +141,7 @@ copyFiles() {
addLibs $BuildRootDir/gen/firebird/bin changeRunUser.sh $DestDir/bin
addLibs $BuildRootDir/gen/firebird/bin restoreRootRunUser.sh $DestDir/bin
addLibs $BuildRootDir/gen/firebird/bin changeDBAPassword.sh $DestDir/bin
addLibs $BuildRootDir/gen/firebird/bin changeMultiConnectMode.sh $DestDir/bin
addLibs $BuiltFBDir/bin changeGdsLibraryCompatibleLink.sh $DestDir/bin
addLibs $BuildRootDir/gen/firebird/bin tarMainInstall.sh $BuildRootDir/gen/install/scripts
addLibs $BuildRootDir/gen/firebird/bin tarinstall.sh $BuildRootDir/gen/install/scripts
@ -227,7 +216,8 @@ copyFiles() {
cp $BuildRootDir/gen/install/misc/firebird.conf $DestDir/
cp $BuildRootDir/gen/install/misc/aliases.conf $DestDir/
cp $BuildRootDir/gen/install/misc/fbintl.conf $DestDir/intl/
cp $BuildRootDir/gen/install/misc/firebird.init.d.* $DestDir/misc/
cp $BuildRootDir/gen/install/misc/rc.config.firebird $DestDir/misc
# Create links from @libdir@ to install area.

View File

@ -1,93 +0,0 @@
#!/bin/sh
#
# This library is part of the Firebird project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
#
# The post install script for Firebird Classic
# Detect which linux distro we are installing on
detectDistro
# Make sure the links are in place
if [ -z "$FirebirdInstallPrefix" ]
then
FirebirdInstallPrefix=@prefix@
fi
origDir=`pwd`
# Update /etc/services
# The \n is needed, some /etc/services files are missing a trailing
# line feed - MOD 7-Nov-2002
FileName=/etc/services
newLine="gds_db 3050/tcp # Firebird SQL Database Remote Protocol"
oldLine=`grep "^gds_db" $FileName`
if [ -z "$oldLine" ]
then
echo "" >> $FileName
echo $newLine >> $FileName
echo "" >> $FileName
# replaceLineInFile "$FileName" "$newLine" "$oldLine"
fi
# add Firebird user
if [ $RunUser = "firebird" ]
then
addFirebirdUser
fi
# Update ownership and SUID bits for files.
fixFilePermissions
# Create libgds.so links
createLinksForBackCompatibility
# Prepare for uninstall
buildUninstallFile
# Update the /etc/inetd.conf or xinetd entry
updateInetdServiceEntry
# Get inetd to reread new init files.
resetInetdServer
cd $FBRootDir
# Change sysdba password
changeDBAPassword

View File

@ -1,44 +0,0 @@
#!/bin/sh
#
# This library is part of the Firebird project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: postuninstall.sh.in,v 1.4 2005-08-16 10:04:11 alexpeshkoff Exp $
#
# The post uninstall routine for Firebird Classic.
if [ "$1"=0 ]
then
removeLinksForBackCompatibility
removeInetdServiceEntry
fi

View File

@ -1,82 +0,0 @@
#!/bin/sh
#
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: preinstall.sh.in,v 1.7 2005-08-16 10:04:11 alexpeshkoff Exp $
#
# The pre install routine for Firebird Classic
#------------------------------------------------------------------------
# Check for installed RPM package
# (Pavel I've left this in since originally I could test for other packages,
# even if they did not conflict with current ones, ie we can test InterBase
# and CS/SS The package manager does not allow it currently but I've left
# this in in case that sort of thing gets allowed again
#checkForRPMInstall() {
# PackageName=$1
#
# rpm -q $PackageName
# STATUS=$?
# if [ $STATUS -eq 0 ]
# then
# echo "Previous version of $PackageName is detected on your system."
# echo "this will conflict with the current install of Firebird"
# echo "Please unistall the previous version `rpm -q $PackageName` and then proceed."
# exit $STATUS
# fi
#
#}
#= Main Pre ================================================================
# Ok so any of the following packages are a problem
# these don't work at least in the latest rpm manager, since it
# has the rpm database locked and it fails.
# checkForRPMInstall InterBase
# checkForRPMInstall FirebirdCS
# checkForRPMInstall FirebirdSS
checkIfServerRunning
# Failing that we archive any files we find
archivePriorInstallSystemFiles

View File

@ -1,53 +0,0 @@
#! /bin/sh
#
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# The pre uninstall routines for Firebird Classic
checkIfServerRunning
cd $FBRootDir
if [ -f $SecurityDatabase ]
then
cp $SecurityDatabase /tmp
echo "Saved a copy of $SecurityDatabase in /tmp"
fi
for i in isc_*1* firebird.log SYSDBA.password
do
if [ -f $i ]
then
rm -f $i
fi
done

View File

@ -1,77 +0,0 @@
#!/bin/sh
#
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: tarMainInstall.sh.in,v 1.2 2005-08-16 10:04:11 alexpeshkoff Exp $
#
# Install script for FirebirdSQL database engine
# http://www.firebirdsql.org
InteractiveInstall=1
export InteractiveInstall
checkInstallUser
BuildVersion=@FIREBIRD_VERSION@.@FB_BUILD_NUM@
PackageVersion=@FIREBIRD_PACKAGE_VERSION@
CpuType=@CPU_TYPE@
Version="$BuildVersion-$PackageVersion.$CpuType"
cat <<EOF
Firebird @FIREBIRD_ARCH_TYPE@ $Version Installation
EOF
AskQuestion "Press Enter to start installation or ^C to abort"
# Here we are installing from a install tar.gz file
if [ -e scripts ]
then
echo "Extracting install data"
runAndCheckExit "./scripts/preinstall.sh"
runAndCheckExit "./scripts/tarinstall.sh"
runAndCheckExit "./scripts/postinstall.sh"
fi
echo "Install completed"

View File

@ -1,88 +0,0 @@
#!/bin/sh
#
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: tarMainUninstall.sh.in,v 1.2 2005-08-16 10:04:11 alexpeshkoff Exp $
#
# Install script for FirebirdSQL database engine
# http://www.firebirdsql.org
InteractiveInstall=1
export InteractiveInstall
checkInstallUser
BuildVersion=@FIREBIRD_VERSION@.@FB_BUILD_NUM@
PackageVersion=@FIREBIRD_PACKAGE_VERSION@
CpuType=@CPU_TYPE@
FBRootDir=@prefix@
Version="$BuildVersion-$PackageVersion.$CpuType"
cat <<EOF
Firebird @FIREBIRD_ARCH_TYPE@ $Version Uninstall program
Are you sure you want to proceed?
EOF
AskQuestion "Press Enter to start uninstall or ^C to abort"
# Here we are uninstalling from a install tar.gz file
scriptsDir=$FBRootDir/misc/scripts
if [ -e $scriptsDir ]
then
echo "Extracting install data"
runAndCheckExit "$scriptsDir/preuninstall.sh"
runAndCheckExit "$scriptsDir/postuninstall.sh"
# This one is done last since it deletes the script files
# as well.
runAndCheckExit "$scriptsDir/taruninstall.sh"
fi
echo "Uninstall completed"

View File

@ -1,46 +0,0 @@
#! /bin/sh
#
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
#
# The way this works is that the buildroot file is stored relative to the root
# directory and a tar -xzof at root directory will restore all the files in
# the position that we want them to be
OrigDir=`pwd`
cd /
tar -xzof $OrigDir/buildroot.tar.gz
cd $OrigDir

View File

@ -1,40 +0,0 @@
#! /bin/sh
#
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: taruninstall.sh.in,v 1.2 2005-08-16 10:04:11 alexpeshkoff Exp $
#
removeInstalledFiles # Remove installed files
removeUninstallFiles # Remove the 'uninstall' utility files
removeEmptyDirs # Remove empty directories

View File

@ -1,4 +1,4 @@
Firebird 2.0 Classic Server for Linux
Firebird 2 Server for Linux
More information can be found about the Firebird

View File

@ -1,4 +1,26 @@
#!/bin/sh
#
# 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
#
RunUser=firebird
export RunUser
@ -119,7 +141,7 @@ getInitScriptLocation() {
# stop super server if it is running
stopSuperServerIfRunning() {
checkString=`ps -efww| egrep "\b(fbserver|fbguard)\b" |grep -v grep`
checkString=`ps -eaf | egrep "\b(fbserver|fbguard|fb_smp_server)\b" |grep -v grep`
if [ ! -z "$checkString" ]
then
@ -132,7 +154,7 @@ stopSuperServerIfRunning() {
do
$init_d stop
sleep 1
checkString=`ps -efww| egrep "\b(fbserver|fbguard)\b" |grep -v grep`
checkString=`ps -eaf | egrep "\b(fbserver|fbguard|fb_smp_server)\b" |grep -v grep`
if [ -z "$checkString" ]
then
return
@ -175,3 +197,213 @@ generateNewDBAPassword() {
writeNewPassword $NewPasswd
}
#------------------------------------------------------------------------
# change init.d RunUser
changeInitRunUser() {
NewUser=$1
InitFile=`getInitScriptLocation`
if [ -f "$InitFile" ]
then
editFile "$InitFile" FBRunUser "FBRunUser=$NewUser"
chmod u=rwx,g=rx,o= "$InitFile"
fi
}
#------------------------------------------------------------------------
# installInitdScript
# Everbody stores this one in a seperate location, so there is a bit of
# running around to actually get it for each packager.
# Update rcX.d with Firebird initd entries
# initd script for SuSE >= 7.2 is a part of RPM package
installInitdScript() {
Arch=$1
if [ "$Arch" != super ]; then
return 0
fi
srcScript=""
initScript=
# This is for RH and MDK specific
if [ -e /etc/rc.d/init.d/functions ]
then
srcScript=firebird.init.d.mandrake
initScript=/etc/rc.d/init.d/firebird
# SuSE specific
elif [ -r /etc/SuSE-release ]
then
srcScript=firebird.init.d.suse
initScript=/etc/init.d/firebird
rm -f /usr/sbin/rcfirebird
ln -s ../../etc/init.d/firebird /usr/sbin/rcfirebird
# Debian specific
elif [ -r /etc/debian_version ]
then
srcScript=firebird.init.d.debian
initScript=/etc/init.d/firebird
rm -f /usr/sbin/rcfirebird
ln -s ../../etc/init.d/firebird /usr/sbin/rcfirebird
# Slackware specific
elif [ -r /etc/slackware-version ]
then
srcScript=firebird.init.d.slackware
initScript=/etc/rc.d/rc.firebird
rclocal=/etc/rc.d/rc.local
if ! grep -q "$initScript" $rclocal
then
cat >>$rclocal <<EOF
if [ -x $initScript ] ; then
$initScript start
fi
EOF
fi
# Gentoo specific
elif [ -r /etc/gentoo-release ]
then
srcScript=firebird.init.d.gentoo
initScript=/etc/init.d/firebird
# Generic...
elif [ -d /etc/rc.d/init.d ]
then
srcScript=firebird.init.d.generic
initScript=/etc/rc.d/init.d/firebird
fi
if [ "$initScript" ]
then
# Install the firebird init.d script
cp $FBRootDir/misc/$srcScript $initScript
chown root:root $initScript
chmod ug=rx,o=r $initScript
# RedHat and Mandrake specific
if [ -x /sbin/chkconfig ]
then
/sbin/chkconfig --add firebird
# Gentoo specific
elif [ -x /sbin/rc-update ]
then
/sbin/rc-update add firebird default
# Suse (& Debian ?) specific
elif [ -x /sbin/insserv ]
then
/sbin/insserv /etc/init.d/firebird
# One more way to register service - used in Knoppix (& Debian ?)
elif [ -x /usr/sbin/update-rc.d ]
then
/usr/sbin/update-rc.d firebird start 14 2 3 5 . stop 20 0 1 6 .
fi
# More SuSE - rc.config fillup
if [ -f /etc/rc.config ]
then
if [ -x /bin/fillup ]
then
/bin/fillup -q -d = /etc/rc.config $FBRootDir/misc/rc.config.firebird
fi
elif [ -d /etc/sysconfig ]
then
cp $FBRootDir/misc/rc.config.firebird /etc/sysconfig/firebird
fi
else
echo "Couldn't autodetect linux type. You must select"
echo "the most appropriate startup script in $FBRootDir/misc/"
echo "and manually register it in your OS."
fi
# Create directory to store pidfile
if [ ! -d $PidDir ]
then
[ -e $PidDir ] && rm -rf $PidDir
mkdir $PidDir
fi
chown $RunUser:$RunGroup $PidDir
}
#------------------------------------------------------------------------
# start init.d service
startService() {
Arch=$1
if [ "$Arch" != super ]; then
return 0
fi
InitFile=`getInitScriptLocation`
if [ -f "$InitFile" ]
then
"$InitFile" start
checkString=`ps -eaf | egrep "\b(fbserver|fb_smp_server)\b" |grep -v grep`
if [ -z "$checkString" ]
then
# server didn't start - possible reason bad shell /bin/false for user "firebird"
echo
echo Fixing firebird\'s shell to /bin/sh
echo
usermod -s /bin/sh firebird
"$InitFile" start
fi
fi
}
#------------------------------------------------------------------------
# If we have right systems remove the service autostart stuff.
removeServiceAutostart() {
InitFile=`getInitScriptLocation`
if [ -f "$InitFile" ]; then
# Unregister using OS command
if [ -x /sbin/insserv ]; then
/sbin/insserv /etc/init.d/
fi
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --del firebird
fi
if [ -x /sbin/rc-update ]; then
/sbin/rc-update del firebird
fi
# Remove /usr/sbin/rcfirebird symlink
if [ -e /usr/sbin/rcfirebird ]
then
rm -f /usr/sbin/rcfirebird
fi
# Remove initd script
if [ -e /etc/init.d/firebird ]; then
rm -f /etc/init.d/firebird
fi
if [ -e /etc/rc.d/init.d/firebird ]; then
rm -f /etc/rc.d/init.d/firebird
fi
fi
}

View File

@ -0,0 +1,82 @@
#!/bin/sh
#
# 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
#
# The post install script for Firebird Server
# Detect which linux distro we are installing on
detectDistro
# Make sure the links are in place
if [ -z "$FirebirdInstallPrefix" ]; then
FirebirdInstallPrefix=@prefix@
fi
origDir=`pwd`
# Update /etc/services
newLine="gds_db 3050/tcp # Firebird SQL Database Remote Protocol"
replaceLineInFile /etc/services "$newLine" "^gds_db"
# add Firebird user
if [ $RunUser = firebird ]; then
addFirebirdUser
fi
# Create the fbmgr shell script.
if [ -x $FBBin/fbmgr.bin ]; then
cat > $FBBin/fbmgr <<EOF
#!/bin/sh
FIREBIRD=$FBRootDir
export FIREBIRD
exec \$FIREBIRD/bin/fbmgr.bin \$@
EOF
fi
# Update ownership and SUID bits for files.
fixFilePermissions
# Install script in /etc/init.d (exact location is distro dependent)
installInitdScript @FIREBIRD_ARCH_TYPE@
# Create libgds.so links
createLinksForBackCompatibility
# Prepare for uninstall
buildUninstallFile
# Update the /etc/inetd.conf or xinetd entry
updateInetdServiceEntry
# Get inetd to reread new init files.
resetInetdServer
# start the db server so we can change the password
startService @FIREBIRD_ARCH_TYPE@
cd $FBRootDir
# Change sysdba password
changeDBAPassword

View File

@ -0,0 +1,38 @@
#!/bin/sh
#
# 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
#
# The post uninstall routine for Firebird Server.
if [ "$1"=0 ]
then
removeLinksForBackCompatibility
removeServiceAutostart
removeInetdServiceEntry
fi
if [ -d $PidDir ]
then
rm -rf $PidDir
fi

View File

@ -0,0 +1,72 @@
#!/bin/sh
#
# 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
#
# The pre install routine for Firebird Server
#------------------------------------------------------------------------
# Check for installed RPM package
# (Pavel I've left this in since originally I could test for other packages,
# even if they did not conflict with current ones, ie we can test InterBase
# and CS/SS The package manager does not allow it currently but I've left
# this in in case that sort of thing gets allowed again
#checkForRPMInstall() {
# PackageName=$1
#
# rpm -q $PackageName
# STATUS=$?
# if [ $STATUS -eq 0 ]
# then
# echo "Previous version of $PackageName is detected on your system."
# echo "this will conflict with the current install of Firebird"
# echo "Please unistall the previous version `rpm -q $PackageName` and then proceed."
# exit $STATUS
# fi
#
#}
# Ok so any of the following packages are a problem
# these don't work at least in the latest rpm manager, since it
# has the rpm database locked and it fails.
# checkForRPMInstall InterBase
# checkForRPMInstall FirebirdCS
# checkForRPMInstall FirebirdSS
# That test in general package is wrong also due to the fact that it does not check
# for presence of rpm in the system - there are many rpm-less distros.
# I keep it here commented just in order not to loose it in CVS archives. AP - 2008.
#= Main PreInstall =========================================================
# It's good ide not to have running firebird/interbase instances
checkIfServerRunning
# Archive any files we find
archivePriorInstallSystemFiles

View File

@ -0,0 +1,44 @@
#! /bin/sh
#
# 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
#
# The pre uninstall routines for Firebird Server
checkIfServerRunning
cd $FBRootDir
if [ -f $SecurityDatabase ]; then
cp $SecurityDatabase /tmp
echo "Saved a copy of SecurityDatabase ($SecurityDatabase) in /tmp"
chown root:root /tmp/$SecurityDatabase
chmod 0600 /tmp/$SecurityDatabase
fi
for i in isc_*1* firebird.log SYSDBA.password; do
if [ -f $i ]; then
rm -f $i
fi
done
rm -f $FBBin/fbmgr

View File

@ -1,165 +0,0 @@
#!/bin/sh
#------------------------------------------------------------------------
# change init.d RunUser
changeInitRunUser() {
NewUser=$1
InitFile=`getInitScriptLocation`
if [ -f "$InitFile" ]
then
editFile "$InitFile" FBRunUser "FBRunUser=$NewUser"
chmod u=rwx,g=rx,o= "$InitFile"
fi
}
#------------------------------------------------------------------------
# installInitdScript
# Everbody stores this one in a seperate location, so there is a bit of
# running around to actually get it for each packager.
# Update rcX.d with Firebird initd entries
# initd script for SuSE >= 7.2 is a part of RPM package
installInitdScript() {
srcScript=""
initScript=
# This is for RH and MDK specific
if [ -e /etc/rc.d/init.d/functions ]
then
srcScript=firebird.init.d.mandrake
initScript=/etc/rc.d/init.d/firebird
# SuSE specific
elif [ -r /etc/SuSE-release ]
then
srcScript=firebird.init.d.suse
initScript=/etc/init.d/firebird
rm -f /usr/sbin/rcfirebird
ln -s ../../etc/init.d/firebird /usr/sbin/rcfirebird
# Debian specific
elif [ -r /etc/debian_version ]
then
srcScript=firebird.init.d.debian
initScript=/etc/init.d/firebird
rm -f /usr/sbin/rcfirebird
ln -s ../../etc/init.d/firebird /usr/sbin/rcfirebird
# Slackware specific
elif [ -r /etc/slackware-version ]
then
srcScript=firebird.init.d.slackware
initScript=/etc/rc.d/rc.firebird
rclocal=/etc/rc.d/rc.local
if ! grep -q "$initScript" $rclocal
then
cat >>$rclocal <<EOF
if [ -x $initScript ] ; then
$initScript start
fi
EOF
fi
# Gentoo specific
elif [ -r /etc/gentoo-release ]
then
srcScript=firebird.init.d.gentoo
initScript=/etc/init.d/firebird
# Generic...
elif [ -d /etc/rc.d/init.d ]
then
srcScript=firebird.init.d.generic
initScript=/etc/rc.d/init.d/firebird
fi
if [ "$initScript" ]
then
# Install the firebird init.d script
cp $FBRootDir/misc/$srcScript $initScript
chown root:root $initScript
chmod ug=rx,o=r $initScript
# RedHat and Mandrake specific
if [ -x /sbin/chkconfig ]
then
/sbin/chkconfig --add firebird
# Gentoo specific
elif [ -x /sbin/rc-update ]
then
/sbin/rc-update add firebird default
# Suse (& Debian ?) specific
elif [ -x /sbin/insserv ]
then
/sbin/insserv /etc/init.d/firebird
# One more way to register service - used in Knoppix (& Debian ?)
elif [ -x /usr/sbin/update-rc.d ]
then
/usr/sbin/update-rc.d firebird start 14 2 3 5 . stop 20 0 1 6 .
fi
# More SuSE - rc.config fillup
if [ -f /etc/rc.config ]
then
if [ -x /bin/fillup ]
then
/bin/fillup -q -d = /etc/rc.config $FBRootDir/misc/rc.config.firebird
fi
elif [ -d /etc/sysconfig ]
then
cp $FBRootDir/misc/rc.config.firebird /etc/sysconfig/firebird
fi
else
echo "Couldn't autodetect linux type. You must select"
echo "the most appropriate startup script in $FBRootDir/misc/"
echo "and manually register it in your OS."
fi
# Create directory to store pidfile
if [ ! -d $PidDir ]
then
[ -e $PidDir ] && rm -rf $PidDir
mkdir $PidDir
fi
chown $RunUser:$RunGroup $PidDir
}
#------------------------------------------------------------------------
# start init.d service
startService() {
InitFile=`getInitScriptLocation`
if [ -f $InitFile ]
then
$InitFile start
checkString=`ps -efww| grep fbserver |grep -v grep`
if [ -z "$checkString" ]
then
# server didn't start - possible reason bad shell /bin/false for user "firebird"
echo
echo Fixing firebird\'s shell to /bin/sh
echo
usermod -s /bin/sh firebird
$InitFile start
fi
fi
}

View File

@ -0,0 +1,62 @@
#!/bin/sh
#
# 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
#
# Install script for FirebirdSQL database engine
# http://www.firebirdsql.org
InteractiveInstall=1
export InteractiveInstall
checkInstallUser
BuildVersion=@FIREBIRD_VERSION@.@FB_BUILD_NUM@
PackageVersion=@FIREBIRD_PACKAGE_VERSION@
CpuType=@CPU_TYPE@
Version="$BuildVersion-$PackageVersion.$CpuType"
cat <<EOF
Firebird @FIREBIRD_ARCH_TYPE@ $Version Installation
EOF
AskQuestion "Press Enter to start installation or ^C to abort"
# Here we are installing from a install tar.gz file
if [ -e scripts ]; then
echo "Extracting install data"
runAndCheckExit "./scripts/preinstall.sh"
runAndCheckExit "./scripts/tarinstall.sh"
runAndCheckExit "./scripts/postinstall.sh"
fi
echo "Install completed"

View File

@ -0,0 +1,75 @@
#!/bin/sh
#
# 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
#
# UnInstall script for FirebirdSQL database engine
# http://www.firebirdsql.org
InteractiveInstall=1
export InteractiveInstall
checkInstallUser
BuildVersion=@FIREBIRD_VERSION@.@FB_BUILD_NUM@
PackageVersion=@FIREBIRD_PACKAGE_VERSION@
CpuType=@CPU_TYPE@
FBRootDir=@prefix@
Version="$BuildVersion-$PackageVersion.$CpuType"
cat <<EOF
Firebird @FIREBIRD_ARCH_TYPE@ $Version Uninstall program
Are you sure you want to proceed?
EOF
AskQuestion "Press Enter to start uninstall or ^C to abort"
# Here we are uninstalling from a install tar.gz file
scriptsDir=$FBRootDir/misc/scripts
if [ -e $scriptsDir ]
then
echo "Extracting install data"
runAndCheckExit "$scriptsDir/preuninstall.sh"
runAndCheckExit "$scriptsDir/postuninstall.sh"
# This one is done last since it deletes the script files
# as well.
runAndCheckExit "$scriptsDir/taruninstall.sh"
fi
echo "Uninstall completed"

View File

@ -0,0 +1,35 @@
#!/bin/sh
#
# 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
#
# The way this works is that the buildroot file is stored relative to the root
# directory and a tar -xzof at root directory will restore all the files in
# the position that we want them to be
OrigDir=`pwd`
cd /
tar -xzof "$OrigDir/buildroot.tar.gz"
cd "$OrigDir"

View File

@ -0,0 +1,28 @@
#! /bin/sh
#
# 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
#
removeInstalledFiles # Remove installed files
removeUninstallFiles # Remove the 'uninstall' utility files
removeEmptyDirs # Remove empty directories

View File

@ -1,37 +1,28 @@
#!/bin/sh
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
#
# 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
#
# This library is part of the FirebirdSQL project
# Script to copy install files from the build/transport area
@ -65,7 +56,7 @@ addLibs() {
rm -f $libTarget
touch $libTarget
for i in posixLibrary.sh superLibrary.sh linuxLibrary.sh superLinux.sh
for i in posixLibrary.sh superLibrary.sh linuxLibrary.sh
do
echo "# $i" >>$libTarget
cat $libSdir/$i >>$libTarget

View File

@ -1,38 +0,0 @@
#!/bin/sh
# This runs after firebird archive is opened
origDir=`pwd`
# Update /etc/services
newLine="gds_db 3050/tcp # Firebird SQL Database Remote Protocol"
replaceLineInFile /etc/services "$newLine" "^gds_db"
# Update ownership of files
if [ $RunUser = firebird ]
then
# Prepare firebird user
addFirebirdUser
fi
# Create the fbmgr shell script.
cat > $FBBin/fbmgr <<EOF
#!/bin/sh
FIREBIRD=$FBRootDir
export FIREBIRD
exec \$FIREBIRD/bin/fbmgr.bin \$@
EOF
# proceed with install tasks
fixFilePermissions
installInitdScript
createLinksForBackCompatibility
buildUninstallFile
# start the db server so we can change the password
startService
# Change sysdba password
cd $FBRootDir
changeDBAPassword

View File

@ -1,41 +0,0 @@
#! /bin/sh
#= Main PostUn ===============================================================
if [ "$1"=0 ]
then
removeLinksForBackCompatibility
# If we have right systems remove the service autoconfig stuff.
if [ -x /sbin/insserv ]
then
/sbin/insserv /etc/init.d/
fi
if [ -x /sbin/chkconfig ]
then
/sbin/chkconfig --del firebird
fi
# Remove /usr/sbin/rcfirebird symlink
if [ -e /usr/sbin/rcfirebird ]
then
rm -f /usr/sbin/rcfirebird
fi
# Remove initd script
if [ -e /etc/init.d/firebird ]
then
rm -f /etc/init.d/firebird
fi
if [ -e /etc/rc.d/init.d/firebird ]
then
rm -f /etc/rc.d/init.d/firebird
fi
fi
if [ -d $PidDir ]
then
rm -rf $PidDir
fi

View File

@ -1,8 +0,0 @@
#!/bin/sh
# This runs before firebird archive is opened
checkIfServerRunning
# Failing that we archive any files we find
archivePriorInstallSystemFiles

View File

@ -1,27 +0,0 @@
#! /bin/sh
#= Main PreUn ================================================================
stopSuperServerIfRunning
cd $FBRootDir
if [ -f $SecurityDatabase ]
then
cp $SecurityDatabase /tmp
echo "Saved a copy of SecurityDatabase ($SecurityDatabase) in /tmp"
chown root:root /tmp/$SecurityDatabase
chmod 0600 /tmp/$SecurityDatabase
fi
for i in isc_*1* firebird.log SYSDBA.password
do
if [ -f $i ]
then
rm -f $i
fi
done
rm -f $FBBin/fbmgr

View File

@ -1,80 +0,0 @@
#!/bin/sh
#
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: tarMainInstall.sh.in,v 1.3 2005-05-27 22:15:13 asfernandes Exp $
#
# Install script for FirebirdSQL database engine
# http://www.firebirdsql.org
# This is the new file !!!
#== Main Program ==========================================================
InteractiveInstall=1
export InteractiveInstall
checkInstallUser
BuildVersion=@FIREBIRD_VERSION@.@FB_BUILD_NUM@
PackageVersion=@FIREBIRD_PACKAGE_VERSION@
CpuType=@CPU_TYPE@
Version="$BuildVersion-$PackageVersion.$CpuType"
cat <<EOF
Firebird @FIREBIRD_ARCH_TYPE@ $Version Installation
EOF
AskQuestion "Press Enter to start installation or ^C to abort"
# Here we are installing from a install tar.gz file
if [ -e scripts ]
then
echo "Extracting install data"
runAndCheckExit "./scripts/preinstall.sh"
runAndCheckExit "./scripts/tarinstall.sh"
runAndCheckExit "./scripts/postinstall.sh"
fi
echo "Install completed"

View File

@ -1,94 +0,0 @@
#!/bin/sh
#
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: tarMainUninstall.sh.in,v 1.3 2005-05-27 22:15:13 asfernandes Exp $
#
# Install script for FirebirdSQL database engine
# http://www.firebirdsql.org
# This is the new file !!!
#== Main Program ==========================================================
InteractiveInstall=1
export InteractiveInstall
checkInstallUser
BuildVersion=@FIREBIRD_VERSION@.@FB_BUILD_NUM@
PackageVersion=@FIREBIRD_PACKAGE_VERSION@
CpuType=@CPU_TYPE@
FBRootDir=@prefix@
Version="$BuildVersion-$PackageVersion.$CpuType"
cat <<EOF
Firebird @FIREBIRD_ARCH_TYPE@ $Version Uninstall program
Are you sure you want to proceed?
EOF
AskQuestion "Press Enter to start uninstall or ^C to abort"
# Here we are uninstalling from a install tar.gz file
scriptsDir=$FBRootDir/misc/scripts
if [ -e $scriptsDir ]
then
echo "Extracting install data"
runAndCheckExit "$scriptsDir/preuninstall.sh"
runAndCheckExit "$scriptsDir/postuninstall.sh"
# This one is done last since it deletes the script files
# as well.
runAndCheckExit "$scriptsDir/taruninstall.sh"
fi
echo "Uninstall completed"

View File

@ -1,46 +0,0 @@
#!/bin/sh
#
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
#
# THe way this works is that the buildroot file is stored relative to the root
# directory and a tar -xzof at root directory will restore all the files in
# the position that we want them to be
OrigDir=`pwd`
cd /
tar -xzof "$OrigDir/buildroot.tar.gz"
cd "$OrigDir"

View File

@ -1,40 +0,0 @@
#! /bin/sh
#
# This library is part of the FirebirdSQL project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: taruninstall.sh.in,v 1.4 2005-08-16 10:04:13 alexpeshkoff Exp $
#
removeInstalledFiles # Remove installed files
removeUninstallFiles # Remove the 'uninstall' utility files
removeEmptyDirs # Remove empty directories

View File

@ -1,39 +1,26 @@
#!/bin/sh
#
# This library is part of the Firebird project
# 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
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
#
# Contributor(s):
#
#
# $Id: changeGdsLibraryCompatibleLink.sh.in,v 1.3 2005-08-16 10:03:22 alexpeshkoff Exp $
#
# This script allows the user to change the link on classic for the
# client library from

View File

@ -0,0 +1,65 @@
#!/bin/sh
#
# 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 Alex Peshkoff
# for the Firebird Open Source RDBMS project.
#
# Copyright (c) 2008 Alex Peshkoff <peshkoff@mail.ru>
# and all contributors signed below.
#
# All Rights Reserved.
# Contributor(s): ______________________________________.
#
#= Main ====================================================================
FBRootDir=/opt/firebird.CS.2.5
FBBin=$FBRootDir/bin
cat <<EOF
For classic server there are two ways to support multiple connections:
multyprocess (traditional for FB classic server) and multythread (new for FB 2.5).
Multyprocess mode is specially reliable cause error in one process does not affect others.
Multythread minimizes OS load and should provide better scalability under high loads.
EOF
AskQuestion "Which option would you like to choose: multy-(process|thread) [process] " "process"
multyAnswer=$Answer
case $multyAnswer in
process)
;;
thread)
;;
*)
echo "Unknown option $multyAnswer chosen"
;;
esac
echo "Stopping currently running engine..."
checkIfServerRunning
removeInetdServiceEntry
removeServiceAutostart
echo "Starting firebird in multy$multyAnswer mode..."
if [ $multyAnswer == process ]; then
updateInetdServiceEntry
resetInetdServer
else
installInitdScript super
startService super
fi
echo "Done."

View File

@ -1,4 +1,26 @@
#!/bin/sh
#
# 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
#
# A routine to change the user that runs interbase Firebird

View File

@ -1,4 +1,26 @@
#!/bin/sh
#
# 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
#
#------------------------------------------------------------------------
# init defaults
@ -155,21 +177,3 @@ updateInetdServiceEntry() {
updateInetdEntry
fi
}
#------------------------------------------------------------------------
# change init.d RunUser
changeInitRunUser() {
# do nothing for CS
return 0
}
#------------------------------------------------------------------------
# start init.d service
startService() {
# do nothing for CS
return 0
}

View File

@ -1,34 +1,24 @@
#! /bin/sh
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
# 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.
#
# Created by: Mark O'Donohue <mark.odonohue@firebirdsql.org>
# 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.
#
# Contributor(s):
#
# $Id: fb_config.in,v 1.2 2005-05-27 22:15:57 asfernandes Exp $
# 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): ______________________________________.
#
# stored configuration values

View File

@ -1,4 +1,26 @@
#!/bin/sh
#
# 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
#
#------------------------------------------------------------------------
@ -173,6 +195,15 @@ checkIfServerRunning() {
# Check is server is being actively used.
checkString=`ps -eaf | egrep "\b(fb_smp_server)\b" |grep -v grep`
if [ ! -z "$checkString" ]
then
echo "An instance of the Firebird SuperClassic server seems to be running."
echo "Please quit all Firebird applications and then proceed."
exit 1
fi
checkString=`ps -eaf | egrep "\b(fbserver|fbguard)\b" |grep -v grep`
if [ ! -z "$checkString" ]
@ -216,13 +247,6 @@ checkIfServerRunning() {
removeInetdServiceEntry
# Stop lock manager if it is the only thing running.
for i in `ps -eaf | grep "fb_lock_mgr" | grep -v "grep" | awk '{print $2}' `
do
kill $i
done
}
@ -359,7 +383,7 @@ EOT
cat <<EOT >>$DBAPasswordFile
# Your password can be changed to a more suitable one using the
# @prefix@/bin/changeDBAPassword.sh script
# @prefix@/bin/gsec utility.
EOT
chmod u=r,go= $DBAPasswordFile

View File

@ -1,4 +1,26 @@
#!/bin/sh
#
# 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
#
# A routine to change the user that runs interbase Firebird

View File

@ -1,4 +1,26 @@
#!/bin/sh
#
# 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
#
#------------------------------------------------------------------------
# init defaults