mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 21:23:03 +01:00
HPUX Head->B2_1_Release
This commit is contained in:
parent
cdfaa44ab7
commit
74700ff3ae
172
builds/install/arch-specific/hpux/Makefile.in
Normal file
172
builds/install/arch-specific/hpux/Makefile.in
Normal file
@ -0,0 +1,172 @@
|
||||
# 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: Makefile.in,v 1.3.2.2 2008-01-17 13:14:10 paulbeach Exp $
|
||||
#
|
||||
ROOT=..
|
||||
|
||||
|
||||
|
||||
include $(ROOT)/gen/make.defaults
|
||||
include $(ROOT)/gen/make.platform
|
||||
include $(ROOT)/gen/make.rules
|
||||
include $(ROOT)/gen/make.shared.variables
|
||||
|
||||
|
||||
FirebirdInstallPrefix=@prefix@
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
FIREBIRD=$(FirebirdInstallPrefix)
|
||||
|
||||
export -n FIREBIRD
|
||||
export -n INTERBASE
|
||||
|
||||
.PHONY: install dist packages depotfile tarfile
|
||||
.PHONY: buildDepot buildTarDir buildImageDir buildRoot buildDebugInfo
|
||||
|
||||
# Some of these targets are run from the root tree of the build.
|
||||
# those need to know where the install subdirectory is kept.
|
||||
# Others are run locally these need to know the path back to the
|
||||
# root of the build tree.
|
||||
|
||||
BuildRoot=$(GEN_ROOT)
|
||||
|
||||
InstallRoot=.
|
||||
|
||||
|
||||
FirebirdBuildPrefix=$(GEN_ROOT)
|
||||
|
||||
#export FirebirdBuildPrefix
|
||||
#export FirebirdInstallPrefix
|
||||
#export PackageVersion
|
||||
|
||||
BuildVersion=$(FirebirdVersion).$(BuildNum)
|
||||
|
||||
Version=$(BuildVersion)-$(PackageVersion)
|
||||
|
||||
|
||||
|
||||
# This means something like: FirebirdCS-2.0.0-1.i386.tar
|
||||
|
||||
TarDir= Firebird$(ArchPrefix)-$(Version).$(CpuType)
|
||||
TarFile=Firebird$(ArchPrefix)-$(Version).$(CpuType).tar
|
||||
DepotFile=Firebird$(ArchPrefix)-$(Version).$(CpuType).depot
|
||||
RPMFile=Firebird$(ArchPrefix)-$(Version).$(CpuType).rpm
|
||||
DebugDir=Firebird$(ArchPrefix)-debuginfo-$(Version).$(CpuType)
|
||||
DebugFile=Firebird$(ArchPrefix)-debuginfo-$(Version).$(CpuType).tar
|
||||
psfFile=firebird$(ArchPrefix).psf
|
||||
|
||||
PkgSrcDir=$(InstallRoot)/$(ArchType)
|
||||
ScriptDir=$(GEN_ROOT)/install/scripts/
|
||||
RPMSrcDir=$(GEN_ROOT)/install/scripts
|
||||
|
||||
TarInstallDir=$(GEN_ROOT)/install
|
||||
|
||||
dist : packages
|
||||
|
||||
packages: depotfile tarfile debugfile
|
||||
depotfile: $(DepotFile)
|
||||
|
||||
$(DepotFile): buildDepot
|
||||
(cd $(GEN_ROOT); swpackage -d "| gzip -c > $(DepotFile).gz" -x media_type=tape -s $(psfFile))
|
||||
|
||||
tarfile: $(TarFile)
|
||||
|
||||
$(TarFile) : buildTarDir
|
||||
(cd $(GEN_ROOT); tar -cvf $(TarFile) $(TarDir))
|
||||
|
||||
debugfile: $(DebugFile)
|
||||
|
||||
$(DebugFile) : buildImageDir
|
||||
(cd $(GEN_ROOT)/$(DebugDir); tar -cvf ../$(DebugFile) *)
|
||||
|
||||
# objcopy --add-gnu-debuglink fails with binutils 2.14 or older
|
||||
# its failure affects only GDB ability to pick up external debug
|
||||
# symbols automatically. We may use eu-strip command from elfutils
|
||||
# instead, but it doesn't work or compile with such distros
|
||||
# as Mandrake 9.0 not saying about older ones. New binutils
|
||||
# seem to compile and work everywhere I tried, but we try to
|
||||
# use eu-strip first since it is a part of default Red Hat 9
|
||||
# install and is available in binary form for Mandrake 9.1 and newer.
|
||||
#
|
||||
# 28-Dec-2003. Nickolay Samofatov
|
||||
#
|
||||
# Do not use eu-strip any longer because version 0.89/AMD64 shipped with
|
||||
# Mandrake 9.2 produces broken debuginfo packages and there is no easy way to
|
||||
# detect the breakage. Binutils seem to be more reliable alternative to me.
|
||||
#
|
||||
# 05-Apr-2004. Nickolay Samofatov
|
||||
#
|
||||
|
||||
buildRoot:
|
||||
(cd $(GEN_ROOT); ./install/makeinstallImage.sh)
|
||||
|
||||
buildDebugInfo: buildRoot
|
||||
mkdir -p $(GEN_ROOT)/$(DebugDir)
|
||||
for x in `(cd $(GEN_ROOT)/buildroot; find)`; do \
|
||||
FIL=$(GEN_ROOT)/buildroot/$$x; \
|
||||
D_FIL=$(GEN_ROOT)/$(DebugDir)/`dirname $${x}`/.debug/`basename $${x}`.debug; \
|
||||
if [ ! -h $$FIL ] && readelf -h $$FIL > /dev/null 2> /dev/null; then \
|
||||
mkdir -p $(GEN_ROOT)/$(DebugDir)/`dirname $$x`/.debug; \
|
||||
echo Generating external debug info for $$x; \
|
||||
cp $${FIL} $${D_FIL}; \
|
||||
if objcopy --add-gnu-debuglink $${D_FIL} $${FIL}; > /dev/null 2> /dev/null; then \
|
||||
echo Succeeded using objcopy from binutils; \
|
||||
else \
|
||||
echo Failed to set debug link for $${x}; \
|
||||
fi; \
|
||||
echo Stripping unneeded symbols from $${x}; \
|
||||
objcopy --strip-debug --strip-unneeded $${FIL}; \
|
||||
fi; \
|
||||
done
|
||||
# Work around GDB 6.0 bug
|
||||
mkdir -p $(GEN_ROOT)/$(DebugDir)@libdir@/.debug
|
||||
for x in `ls $(GEN_ROOT)/$(DebugDir)@prefix@/lib/.debug`; do \
|
||||
ln -f -s @prefix@/lib/.debug/`basename $$x` $(GEN_ROOT)/$(DebugDir)@libdir@/.debug; \
|
||||
done
|
||||
|
||||
# Use this line if you don't want to use separate debug info
|
||||
buildImageDir: buildRoot
|
||||
#buildImageDir: buildDebugInfo
|
||||
|
||||
|
||||
buildTarDir: buildImageDir
|
||||
mkdir -p $(GEN_ROOT)/$(TarDir)
|
||||
cp -r $(GEN_ROOT)/install/scripts $(GEN_ROOT)/$(TarDir)
|
||||
cp -r $(GEN_ROOT)/install/scripts/tarmainInstall.sh $(GEN_ROOT)/$(TarDir)/install.sh
|
||||
chmod a+x $(GEN_ROOT)/$(TarDir)/install.sh $(GEN_ROOT)/$(TarDir)/scripts/*sh
|
||||
(cd $(GEN_ROOT)/buildroot; tar -cvf buildroot.tar usr opt )
|
||||
(cd $(GEN_ROOT)/buildroot; tar -tvf buildroot.tar > manifest.txt )
|
||||
(cd $(GEN_ROOT)/buildroot; cp buildroot.tar ../$(TarDir)/buildroot.tar )
|
||||
(cd $(GEN_ROOT)/buildroot; cp manifest.txt ../$(TarDir)/manifest.txt )
|
||||
|
||||
install: buildTarDir
|
||||
(cd $(GEN_ROOT)/$(TarDir); ./install.sh)
|
||||
cp -r $(GEN_ROOT)/$(DebugDir)/* /
|
140
builds/install/arch-specific/hpux/classic/firebirdCS.psf.in
Normal file
140
builds/install/arch-specific/hpux/classic/firebirdCS.psf.in
Normal file
@ -0,0 +1,140 @@
|
||||
depot
|
||||
layout_version 1.0
|
||||
vendor
|
||||
tag Firebird
|
||||
title Firebird Project
|
||||
description "Firebird Database"
|
||||
end
|
||||
|
||||
product
|
||||
tag Firebird
|
||||
title "Firebird Database for HP-UX"
|
||||
description "Firebird Relational Database Classic"
|
||||
revision 2.1.0
|
||||
category database
|
||||
category_title Database
|
||||
preinstall install/scripts/preInstall.sh
|
||||
postinstall install/scripts/postInstall.sh
|
||||
preremove install/scripts/preUninstall.sh
|
||||
postremove install/scripts/postUninstall.sh
|
||||
#
|
||||
architecture HP-UX_B.11_64
|
||||
os_name HP-UX
|
||||
os_release ?.11.*
|
||||
os_version ?
|
||||
#
|
||||
fileset
|
||||
tag main
|
||||
file -u 0666 -g firebird -o firebird firebird/security2.fdb /opt/firebird/security2.fdb
|
||||
file -u 0644 -g firebird -o firebird firebird/misc/firebird.conf /opt/firebird/firebird.conf
|
||||
file -u 0644 -g firebird -o firebird ../builds/install/misc/aliases.conf.in /opt/firebird/aliases.conf
|
||||
file -u 0644 -g firebird -o firebird firebird/misc/fbintl.conf /opt/firebird/fbintl.conf
|
||||
file -u 0644 -g firebird -o firebird ../doc/WhatsNew /opt/firebird/WhatsNew
|
||||
end
|
||||
#
|
||||
fileset
|
||||
tag scripts
|
||||
file -u 0555 -g firebird -o firebird install/bin/changeRunUser.sh /opt/firebird/bin/changeRunUser.sh
|
||||
file -u 0555 -g firebird -o firebird install/bin/restoreRootRunUser.sh /opt/firebird/bin/restoreRootRunUser.sh
|
||||
file -u 0555 -g firebird -o firebird install/bin/changedbaPassword.sh /opt/firebird/bin/changedbaPassword.sh
|
||||
end
|
||||
fileset
|
||||
tag include
|
||||
file -u 0644 -g firebird -o firebird firebird/include/ib_util.h /opt/firebird/include/ib_util.h
|
||||
file -u 0644 -g firebird -o firebird firebird/include/perf.h /opt/firebird/include/perf.h
|
||||
file -u 0644 -g firebird -o firebird firebird/include/iberror.h /opt/firebird/include/iberror.h
|
||||
file -u 0644 -g firebird -o firebird firebird/include/ibase.h /opt/firebird/include/ibase.h
|
||||
end
|
||||
fileset
|
||||
tag intl
|
||||
file -u 0755 -g firebird -o firebird firebird/intl/libfbintl.sl /opt/firebird/intl/libfbintl.sl
|
||||
end
|
||||
fileset
|
||||
tag UDF
|
||||
file -u 0755 -g firebird -o firebird firebird/UDF/ib_udf.sl /opt/firebird/UDF/ib_udf.sl
|
||||
file -u 0755 -g firebird -o firebird firebird/UDF/fbudf.sl /opt/firebird/UDF/fbudf.sl
|
||||
file -u 0644 -g firebird -o firebird ../src/extlib/ib_udf.sql /opt/firebird/UDF/ib_udf.sql
|
||||
file -u 0644 -g firebird -o firebird ../src/extlib/ib_udf2.sql /opt/firebird/UDF/ib_udf2.sql
|
||||
file -u 0644 -g firebird -o firebird ../src/extlib/fbudf/fbudf.sql /opt/firebird/UDF/fbudf.sql
|
||||
end
|
||||
fileset
|
||||
tag bin
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/fb_inet_server /opt/firebird/bin/fb_inet_server
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/gfix /opt/firebird/bin/gfix
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/gbak /opt/firebird/bin/gbak
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/gsplit /opt/firebird/bin/gsplit
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/gsec /opt/firebird/bin/gsec
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/isql /opt/firebird/bin/isql
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/gpre /opt/firebird/bin/gpre
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/gds_drop /opt/firebird/bin/gds_drop
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/gstat /opt/firebird/bin/gstat
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/fb_lock_print /opt/firebird/bin/fb_lock_print
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/fb_lock_mgr /opt/firebird/bin/fb_lock_mgr
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/gdef /opt/firebird/bin/gdef
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/qli /opt/firebird/bin/qli
|
||||
# From 2.0
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/nbackup /opt/firebird/bin/nbackup
|
||||
# From 2.1
|
||||
file -u 0755 -g firebird -o firebird firebird/bin/fbsvcmgr /opt/firebird/bin/fbsvcmgr
|
||||
end
|
||||
fileset
|
||||
tag upgrade
|
||||
file -u 0644 -g firebird -o firebird ../src/misc/upgrade/v2/ib_udf2_params.txt /opt/firebird/upgrade/ib_udf2.params.txt
|
||||
file -u 0644 -g firebird -o firebird ../src/misc/upgrade/v2/ib_udf_params.txt /opt/firebird/upgrade/ib_udf_params.txt
|
||||
file -u 0644 -g firebird -o firebird ../src/misc/upgrade/v2/ib_udf_upgrade.sql /opt/firebird/upgrade/ib_udf_upgrade.sql
|
||||
file -u 0644 -g firebird -o firebird ../src/misc/upgrade/v2/security_database.sql /opt/firebird/upgrade/security_database.sql
|
||||
file -u 0644 -g firebird -o firebird ../src/misc/upgrade/v2/security_database.txt /opt/firebird/upgrade/security_database.txt
|
||||
file -u 0644 -g firebird -o firebird ../src/misc/upgrade/v2.1/metadata_charset.txt /opt/firebird/upgrade/metadata_charset.txt
|
||||
file -u 0644 -g firebird -o firebird ../src/misc/upgrade/v2.1/metadata_charset_create.sql /opt/firebird/upgrade/metadata_charset_create.sql
|
||||
file -u 0644 -g firebird -o firebird ../src/misc/upgrade/v2.1/metadata_charset_drop.sql /opt/firebird/upgrade/metadata_charset_drop.sql
|
||||
end
|
||||
fileset
|
||||
tag examples
|
||||
file -u 0644 -g firebird -o firebird firebird/examples/README /opt/firebird/examples/README
|
||||
file -u 0644 -g firebird -o firebird firebird/examples/functions.c /opt/firebird/examples/functions/functions.c
|
||||
directory firebird/examples/api=/opt/firebird/examples/api
|
||||
file_permissions -u 0644 -g firebird -o firebird
|
||||
file *
|
||||
direcory firebird/examples/dyn=/opt/firebird/examples/dyn
|
||||
file_permissions -u 0644 -g firebird -o firebird
|
||||
file *
|
||||
directory firebird/examples/empbuild=/opt/firebird/examples/empbuild
|
||||
file_permissions -u 0644 -g firebird -o firebird
|
||||
file *
|
||||
directory firebird/examples/include=/opt/firebird/examples/include
|
||||
file_permissions -u 0644 -g firebird -o firebird
|
||||
file *
|
||||
directory firebird/examples/stat=/opt/firebird/examples/stat
|
||||
file_permissions -u 0644 -g firebird -o firebird
|
||||
directory firebird/examples/udf=/opt/firebird/examples/udf
|
||||
file_permissions -u 0644 -g firebird -o firebird
|
||||
file *
|
||||
end
|
||||
fileset
|
||||
tag lib
|
||||
file -u 0755 -g firebird -o firebird firebird/lib/libfbclient.sl.2.1.0 /opt/firebird/lib/libfbclient.sl.2.1.0
|
||||
file -u 0755 -g firebird -o firebird firebird/lib/libfbembed.sl.2.1.0 /opt/firebird/lib/libfbembed.sl.2.1.0
|
||||
file -u 0755 -g firebird -o firebird firebird/lib/libib_util.sl /opt/firebird/lib/libib_util.sl
|
||||
file -u 0755 -g firebird -o firebird firebird/lib/libicudata.sl.30.0 /opt/firebird/lib/libicudata.sl.30.0
|
||||
file -u 0755 -g firebird -o firebird firebird/lib/libicui18n.sl.30.0 /opt/firebird/lib/libicui18n.sl.30.0
|
||||
file -u 0755 -g firebird -o firebird firebird/lib/libicuuc.sl.30.0 /opt/firebird/lib/libicuuc.sl.30.0
|
||||
end
|
||||
fileset
|
||||
tag help
|
||||
file -u 0755 -g firebird -o firebird firebird/help/help.fdb /opt/firebird/help/help.fdb
|
||||
end
|
||||
fileset
|
||||
tag messages
|
||||
file -u 0666 -g firebird -o firebird firebird/firebird.msg /opt/firebird/firebird.msg
|
||||
file -u 0666 -g firebird -o firebird firebird/fr_FR.msg /opt/firebird/fr_FR.msg
|
||||
file -u 0666 -g firebird -o firebird firebird/de_DE.msg /opt/firebird/de_DE.msg
|
||||
end
|
||||
fileset
|
||||
tag docs
|
||||
directory ../doc=/opt/firebird/doc
|
||||
file_permissions -u 0644 -g firebird -o firebird
|
||||
file *
|
||||
end
|
||||
end
|
||||
|
||||
|
256
builds/install/arch-specific/hpux/classic/makeinstallImage.sh.in
Normal file
256
builds/install/arch-specific/hpux/classic/makeinstallImage.sh.in
Normal file
@ -0,0 +1,256 @@
|
||||
#!/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: makeinstallImage.sh.in,v 1.2.2.2 2008-01-17 13:14:13 paulbeach Exp $
|
||||
#
|
||||
|
||||
# Script to copy install files from the build/transport area
|
||||
|
||||
|
||||
# This script builds an image of the installed system into
|
||||
# the gen/buildroot directory.
|
||||
|
||||
|
||||
# Making an assumption that this program is being run in the gen directory
|
||||
BuildRootDir=..
|
||||
BuiltFBDir=./firebird # Where the just built fb exists.
|
||||
|
||||
TargetDir=buildroot # Where we want to build the install image
|
||||
|
||||
RealRootDir=@prefix@ # Where it will be installed on new machine
|
||||
FBRootDir=${RealRootDir#/} # strip off leading /
|
||||
DestDir=$TargetDir/$FBRootDir
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# addLibs
|
||||
# Add required libraries in the beginning of the script
|
||||
# Place it to target directory
|
||||
|
||||
addLibs() {
|
||||
libSdir=$1
|
||||
libScript=$2
|
||||
libTdir=$3
|
||||
libTarget=$libTdir/$libScript
|
||||
|
||||
rm -f $libTarget
|
||||
touch $libTarget
|
||||
for i in posixLibrary.sh classicLibrary.sh hpuxLibrary.sh
|
||||
do
|
||||
echo "# $i" >>$libTarget
|
||||
cat $libSdir/$i >>$libTarget
|
||||
echo "" >>$libTarget # avoid missing linefeed
|
||||
done
|
||||
cat $libSdir/$libScript >>$libTarget
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# copyIfExists
|
||||
# Copy file if it exists
|
||||
#
|
||||
|
||||
copyIfExists() {
|
||||
OldFile=$1
|
||||
NewFile=$2
|
||||
|
||||
if [ -f $OldFile ]
|
||||
then
|
||||
cp $OldFile $NewFile
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# copyFiles
|
||||
# This function copies all the files for a classic distribution into a
|
||||
# directory heirachy mirroring the installation.
|
||||
|
||||
copyFiles() {
|
||||
# The guts of the tranfer of files and other directories
|
||||
|
||||
if [ -d $TargetDir ]
|
||||
then
|
||||
rm -fr $TargetDir
|
||||
fi
|
||||
mkdir -p $DestDir
|
||||
mkdir $DestDir/bin
|
||||
mkdir $DestDir/examples
|
||||
mkdir $DestDir/help
|
||||
mkdir $DestDir/include
|
||||
mkdir $DestDir/intl
|
||||
mkdir $DestDir/lib
|
||||
mkdir $DestDir/doc
|
||||
mkdir $DestDir/doc/sql.extensions
|
||||
mkdir $DestDir/UDF
|
||||
mkdir $DestDir/misc
|
||||
mkdir $DestDir/upgrade
|
||||
|
||||
# mkdir $TargetDir/etc
|
||||
# mkdir $TargetDir/etc/init.d
|
||||
# mkdir $TargetDir/var
|
||||
# mkdir $TargetDir/var/adm
|
||||
# mkdir $TargetDir/var/adm/fillup-templates
|
||||
|
||||
# mkdir -p $TargetDir/usr/sbin
|
||||
mkdir -p $TargetDir@libdir@
|
||||
mkdir -p $TargetDir/usr/include
|
||||
|
||||
cp -f $BuiltFBDir/bin/fb_inet_server $DestDir/bin/fb_inet_server
|
||||
|
||||
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
|
||||
cp $BuiltFBDir/bin/nbackup $DestDir/bin/nbackup
|
||||
copyIfExists $BuiltFBDir/bin/gsplit $DestDir/bin/gsplit
|
||||
cp $BuiltFBDir/bin/gstat $DestDir/bin/gstat
|
||||
copyIfExists $BuiltFBDir/bin/isc4.gbak $DestDir/bin/isc4.gbak
|
||||
cp $BuiltFBDir/bin/isql $DestDir/bin/isql
|
||||
cp $BuiltFBDir/bin/qli $DestDir/bin/qli
|
||||
|
||||
# Append libraries to scripts
|
||||
addLibs $BuildRootDir/gen/firebird/bin changeRunUser.sh $BuildRootDir/gen/install/bin
|
||||
addLibs $BuildRootDir/gen/firebird/bin restoreRootRunUser.sh $BuildRootDir/gen/install/bin
|
||||
addLibs $BuildRootDir/gen/firebird/bin changedbaPassword.sh $BuildRootDir/gen/install/bin
|
||||
addLibs $BuiltFBDir/bin changegdslibrarycompatibleLink.sh $BuildRootDir/gen/install/bin
|
||||
addLibs $BuildRootDir/gen/firebird/bin tarmainInstall.sh $BuildRootDir/gen/install/scripts
|
||||
addLibs $BuildRootDir/gen/firebird/bin tarInstall.sh $BuildRootDir/gen/install/scripts
|
||||
addLibs $BuildRootDir/gen/firebird/bin preInstall.sh $BuildRootDir/gen/install/scripts
|
||||
addLibs $BuildRootDir/gen/firebird/bin postInstall.sh $BuildRootDir/gen/install/scripts
|
||||
addLibs $BuildRootDir/gen/firebird/bin preUninstall.sh $BuildRootDir/gen/install/scripts
|
||||
addLibs $BuildRootDir/gen/firebird/bin postUninstall.sh $BuildRootDir/gen//install/scripts
|
||||
addLibs $BuildRootDir/gen/firebird/bin tarUninstall.sh $BuildRootDir/gen/install/scripts
|
||||
addLibs $BuildRootDir/gen/firebird/bin tarmainUninstall.sh $BuildRootDir/gen/install/scripts
|
||||
mv $BuildRootDir/gen/install/scripts/tarmainUninstall.sh $BuildRootDir/gen/install/scripts/tarMainUninstall.sh
|
||||
cp $BuildRootDir/gen/firebird/bin/createaliasDB.sh $BuildRootDir/gen/install/bin/createaliasDB.sh
|
||||
rm $BuildRootDir/gen/firebird/bin/*.sh
|
||||
cp $BuildRootDir/gen/install/bin/changeRunUser.sh $DestDir/bin
|
||||
cp $BuildRootDir/gen/install/bin/restoreRootRunUser.sh $DestDir/bin
|
||||
cp $BuildRootDir/gen/install/bin/changedbaPassword.sh $DestDir/bin
|
||||
cp $BuildRootDir/gen/install/bin/changegdslibrarycompatibleLink.sh $DestDir/bin
|
||||
cp $BuildRootDir/gen/install/bin/createaliasDB.sh $DestDir/bin
|
||||
# These scripts do not need libraries
|
||||
cp $BuiltFBDir/bin/fb_config $DestDir/bin
|
||||
cp $BuildRootDir/gen/install/misc/firebird.init.d.hpux $DestDir/misc
|
||||
cp $BuildRootDir/gen/install/misc/rc.config.firebird.hpux $DestDir/misc
|
||||
|
||||
# Copy examples only if we have them
|
||||
|
||||
exampleFiles=`find $BuiltFBDir/examples/README -type f -print`
|
||||
if [ -z "$exampleFiles" ]
|
||||
then
|
||||
echo "Example files have not been built!"
|
||||
else
|
||||
(cd $BuiltFBDir/examples; tar cf - .) | (cd $DestDir/examples; tar xf -)
|
||||
fi
|
||||
|
||||
copyIfExists $BuiltFBDir/help/help.gbak $DestDir/help
|
||||
cp $BuiltFBDir/help/help.fdb $DestDir/help
|
||||
|
||||
#cp -r $BuildSrcDir/doc $DestDir
|
||||
#cp -r $BuiltFBDir/doc $DestDir
|
||||
|
||||
cp $BuiltFBDir/firebird.msg $DestDir/firebird.msg
|
||||
cp $BuiltFBDir/$SecurityDatabase $DestDir/$SecurityDatabase
|
||||
|
||||
cp $BuiltFBDir/include/*.h $DestDir/include
|
||||
|
||||
cp -f $BuiltFBDir/lib/libfbembed.sl* $DestDir/lib
|
||||
cp -f $BuiltFBDir/lib/libfbclient.sl* $DestDir/lib
|
||||
|
||||
cp -f $BuiltFBDir/lib/libib_util.sl $DestDir/lib/libib_util.sl
|
||||
|
||||
cp -f $BuiltFBDir/lib/libicu*.sl* $DestDir/lib/
|
||||
|
||||
cp $BuiltFBDir/intl/libfbintl.sl $DestDir/intl/fbintl
|
||||
cp $BuiltFBDir/UDF/ib_udf.sl $DestDir/UDF/
|
||||
cp $BuiltFBDir/UDF/fbudf.sl $DestDir/UDF/
|
||||
|
||||
# Note that the following items copy files from outside the build tree
|
||||
|
||||
# Copy the sql-declarations into the UDF-directory
|
||||
cp $BuildRootDir/src/extlib/ib_udf.sql $DestDir/UDF/
|
||||
cp $BuildRootDir/src/extlib/ib_udf2.sql $DestDir/UDF/
|
||||
cp $BuildRootDir/src/extlib/fbudf/fbudf.sql $DestDir/UDF/
|
||||
|
||||
# Copy various documentation
|
||||
|
||||
cp $BuildRootDir/doc/*.pdf $DestDir/doc
|
||||
cp $BuildRootDir/doc/README.* $DestDir/doc
|
||||
cp $BuildRootDir/doc/sql.extensions/README* $DestDir/doc/sql.extensions
|
||||
cp $BuildRootDir/doc/WhatsNew $DestDir/WhatsNew
|
||||
cp $BuildRootDir/doc/README.user $DestDir/README
|
||||
|
||||
# Misc config files
|
||||
cp $BuildRootDir/gen/install/misc/firebird.conf $DestDir/firebird.conf
|
||||
cp $BuildRootDir/gen/install/misc/aliases.conf $DestDir/
|
||||
cp $BuildRootDir/gen/install/misc/fbintl.conf $DestDir/intl/
|
||||
|
||||
# Create links from @libdir@ to install area.
|
||||
|
||||
origDir=`pwd`
|
||||
cd $DestDir/lib
|
||||
for i in libfb*.sl*; do ln -s /$FBRootDir/lib/$i $origDir/$TargetDir@libdir@/$i; done
|
||||
cd $origDir
|
||||
ln -s ../../$FBRootDir/lib/libib_util.sl $TargetDir@libdir@/libib_util.sl
|
||||
|
||||
|
||||
|
||||
# link include files to /usr/include
|
||||
for i in iberror.h ibase.h ib_util.h
|
||||
do
|
||||
ln -s ../../$FBRootDir/include/$i $TargetDir/usr/include/$i
|
||||
done
|
||||
|
||||
# (cd $DestDir; touch firebird.log;)
|
||||
|
||||
# chmod u=rw,go= firebird.log)
|
||||
# (cd $DestDir; chmod uga+rw examples/*.gdb)
|
||||
|
||||
# chown -R root:root $TargetDir
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#=== MAIN ====================================================================
|
||||
|
||||
SecurityDatabase=security2.fdb
|
||||
|
||||
copyFiles
|
140
builds/install/arch-specific/hpux/classic/postInstall.sh.in
Normal file
140
builds/install/arch-specific/hpux/classic/postInstall.sh.in
Normal file
@ -0,0 +1,140 @@
|
||||
#!/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: postInstall.sh.in,v 1.3.2.2 2008-01-17 13:14:13 paulbeach Exp $
|
||||
#
|
||||
|
||||
# The post install script for Firebird Classic
|
||||
|
||||
# Make sure the links are in place
|
||||
if [ -z "$FirebirdInstallPrefix" ]
|
||||
then
|
||||
FirebirdInstallPrefix=@prefix@
|
||||
ln -s @prefix@/lib/libfbembed.sl.@FIREBIRD_VERSION@ @prefix@/lib/libfbembed.sl.2
|
||||
ln -s @prefix@/lib/libfbembed.sl.2 @prefix@/lib/libfbemebed.sl
|
||||
ln -s @prefix@/lib/libfbembed.sl.@FIREBIRD_VERSION@ @libdir@/libfbembed.sl.@FIREBIRD_VERSION@
|
||||
ln -s @prefix@/lib/libfbembed.sl.2 @libdir@/libfbembed.sl.2
|
||||
ln -s @prefix@/lib/libfbembed.sl @libdir@/libfbembed.sl
|
||||
ln -s @prefix@/lib/libfbclient.sl.@FIREBIRD_VERSION@ @prefix@/lib/libfbclient.sl.2
|
||||
ln -s @prefix@/lib/libfbclient.sl.2 @prefix@/lib/libfbclient.sl
|
||||
ln -s @prefix@/lib/libfbclient.sl.@FIREBIRD_VERSION@ @libdir@/libfbclient.sl.@FIREBIRD_VERSION@
|
||||
ln -s @prefix@/lib/libfbclient.sl.2 @libdir@/libfbclient.sl.2
|
||||
ln -s @prefix@/lib/libfbclient.sl @libdir@/libfbclient.sl
|
||||
ln -s @prefix@/lib/libicudata.sl.30.0 @prefix@/lib/libicudata.sl.30
|
||||
ln -s @prefix@/lib/libicudata.sl.30 @prefix@/lib/libicudata.sl
|
||||
ln -s @prefix@/lib/libicui18n.sl.30.0 @prefix@/lib/libicui18n.sl.30
|
||||
ln -s @prefix@/lib/libicuuc.sl.30 @prefix@/lib/libicuuc.sl
|
||||
ln -s @prefix@/lib/libicuuc.sl.30.0 @prefix@/lib/libicuuc.sl.30
|
||||
ln -s @prefix@/lib/libib_util.sl @libdir@/libib_util.sl
|
||||
ln -s @prefix@/lib/libicui18n.sl.30 @prefix@/lib/libicui18n.sl
|
||||
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
|
||||
|
||||
updateHostsDotFile
|
||||
|
||||
# add Firebird user
|
||||
if [ $RunUser = "firebird" ]
|
||||
then
|
||||
addFirebirdUser
|
||||
fi
|
||||
|
||||
|
||||
# Create Lock files
|
||||
cd $FBRootDir
|
||||
|
||||
for i in isc_init1 isc_lock1 isc_event1
|
||||
do
|
||||
FileName=$i.`hostname`
|
||||
touch $FileName
|
||||
done
|
||||
|
||||
# Create log
|
||||
touch firebird.log
|
||||
|
||||
|
||||
# Update ownership and SUID bits for programs.
|
||||
chown -R $RunUser $FBRootDir
|
||||
chgrp -R $RunUser $FBRootDir
|
||||
|
||||
fixFilePermissions
|
||||
# Correct a couple of minor issues set via FilePermissions
|
||||
chmod 666 security2.fdb
|
||||
chmod 666 isc_lock1.`hostname`
|
||||
echo "Updating Lock Manager"
|
||||
cd $FBBin
|
||||
for i in fb_lock_mgr
|
||||
do
|
||||
if [ -f $i ]
|
||||
then
|
||||
chown root $i
|
||||
chmod ug=rx,o= $i
|
||||
chmod ugo+s $i
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
createLinksForBackCompatibility
|
||||
|
||||
buildUninstallFile
|
||||
|
||||
# Update the /etc/inetd.conf or xinetd entry
|
||||
updateInetdServiceEntry
|
||||
|
||||
|
||||
# Get inetd to reread new init files.
|
||||
resetInetdServer
|
||||
|
||||
|
||||
cd $FBRootDir
|
||||
|
||||
# Change sysdba password
|
||||
changeDBAPassword
|
||||
|
||||
|
||||
|
@ -0,0 +1,51 @@
|
||||
#!/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.3.2.2 2008-01-17 13:14:13 paulbeach Exp $
|
||||
#
|
||||
|
||||
# The post uninstall routine for Firebird Classic.
|
||||
|
||||
if [ "$1"=0 ]
|
||||
then
|
||||
removeLinksForBackCompatibility
|
||||
removeInetdServiceEntry
|
||||
rm -fr /opt/firebird
|
||||
rm /usr/lib/pa20_64/libfbembed.sl
|
||||
rm /usr/lib/pa20_64/libfbembed.sl.2
|
||||
rm /usr/lib/pa20_64/libfbembed.sl.2.1.0
|
||||
rm /usr/lib/pa20_64/libfbclient.sl
|
||||
rm /usr/lib/pa20_64/libfbclient.sl.2
|
||||
rm /usr/lib/pa20_64/libfbclient.sl.2.1.0
|
||||
rm /usr/lib/pa20_64/libib_util.sl
|
||||
fi
|
48
builds/install/arch-specific/hpux/classic/preInstall.sh.in
Normal file
48
builds/install/arch-specific/hpux/classic/preInstall.sh.in
Normal file
@ -0,0 +1,48 @@
|
||||
#!/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.2.2.2 2008-01-17 13:14:14 paulbeach Exp $
|
||||
#
|
||||
|
||||
|
||||
# The pre install routine for Firebird Classic
|
||||
|
||||
#= Main Pre ================================================================
|
||||
|
||||
checkIfServerRunning
|
||||
|
||||
# Failing that we archive any files we find
|
||||
|
||||
archivePriorInstallSystemFiles
|
||||
|
||||
|
55
builds/install/arch-specific/hpux/classic/preUninstall.sh.in
Normal file
55
builds/install/arch-specific/hpux/classic/preUninstall.sh.in
Normal file
@ -0,0 +1,55 @@
|
||||
#! /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: preUninstall.sh.in,v 1.2.2.2 2008-01-17 13:14:14 paulbeach Exp $
|
||||
#
|
||||
|
||||
# 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_init1* isc_event1* isc_lock1* isc_guard* firebird.log SYSDBA.password
|
||||
do
|
||||
if [ -f $i ]
|
||||
then
|
||||
rm -f $i
|
||||
fi
|
||||
done
|
46
builds/install/arch-specific/hpux/classic/tarInstall.sh.in
Normal file
46
builds/install/arch-specific/hpux/classic/tarInstall.sh.in
Normal file
@ -0,0 +1,46 @@
|
||||
#! /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: tarInstall.sh.in,v 1.2.2.2 2008-01-17 13:14:14 paulbeach Exp $
|
||||
#
|
||||
|
||||
# The way this works is that the buildroot file is stored relative to the root
|
||||
# directory and a tar -xvf at root directory will restore all the files in
|
||||
# the position that we want them to be
|
||||
|
||||
OrigDir=`pwd`
|
||||
|
||||
cd /
|
||||
|
||||
tar -xf $OrigDir/buildroot.tar
|
||||
cd $OrigDir
|
39
builds/install/arch-specific/hpux/classic/tarUninstall.sh.in
Normal file
39
builds/install/arch-specific/hpux/classic/tarUninstall.sh.in
Normal file
@ -0,0 +1,39 @@
|
||||
#! /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.2.2 2008-01-17 13:14:14 paulbeach Exp $
|
||||
#
|
||||
|
||||
removeInstalledFiles # Remove installed files
|
||||
removeUninstallFiles # Remove the 'uninstall' utility files
|
||||
removeEmptyDirs # Remove empty directories
|
@ -0,0 +1,76 @@
|
||||
#!/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.2.2 2008-01-17 13:14:14 paulbeach 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 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"
|
||||
|
@ -0,0 +1,86 @@
|
||||
#!/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.2.2 2008-01-17 13:14:14 paulbeach 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"
|
||||
|
194
builds/install/arch-specific/hpux/misc/changedbaPassword.sh.in
Normal file
194
builds/install/arch-specific/hpux/misc/changedbaPassword.sh.in
Normal file
@ -0,0 +1,194 @@
|
||||
#! /bin/sh
|
||||
|
||||
|
||||
# This shell script changes both the SYSDBA user
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Prompt for response, store result in Answer
|
||||
|
||||
Answer=""
|
||||
|
||||
AskQuestion() {
|
||||
Test=$1
|
||||
DefaultAns=$2
|
||||
echo -n "${1}"
|
||||
Answer="$DefaultAns"
|
||||
read Answer
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# changeInitPassword
|
||||
|
||||
|
||||
changeInitPassword() {
|
||||
|
||||
NewPasswd=$1
|
||||
DBAPasswordFile=$FBRootDir/SYSDBA.password
|
||||
|
||||
InitFile=/etc/rc.d/init.d/firebird
|
||||
if [ ! -f $InitFile ]
|
||||
then
|
||||
InitFile=/etc/init.d/firebird
|
||||
fi
|
||||
|
||||
if [ -f $InitFile ]
|
||||
then
|
||||
echo ""
|
||||
echo Running ex to modify $InitFile
|
||||
|
||||
chmod u=rw,g=,o= $InitFile
|
||||
ex $InitFile <<EOF
|
||||
/ISC_PASSWORD/s/ISC_PASSWORD=.*/ISC_PASSWORD=$NewPasswd/g
|
||||
w
|
||||
q
|
||||
EOF
|
||||
chmod u=rwx,g=rx,o= $InitFile
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Write new password to the @prefix@/SYSDBA.password file
|
||||
|
||||
writeNewPassword() {
|
||||
|
||||
NewPasswd=$1
|
||||
DBAPasswordFile=$FBRootDir/SYSDBA.password
|
||||
|
||||
echo "# Firebird generated password for user SYSDBA is: " > $DBAPasswordFile
|
||||
echo "" >> $DBAPasswordFile
|
||||
|
||||
echo "ISC_USER=sysdba" >> $DBAPasswordFile
|
||||
echo "ISC_PASSWD=$NewPasswd" >> $DBAPasswordFile
|
||||
echo "" >> $DBAPasswordFile
|
||||
|
||||
if [ $NewPasswd = "masterkey" ]
|
||||
then
|
||||
echo "# for install on `hostname` at time `date`" >> $DBAPasswordFile
|
||||
echo "# You should change this password at the earliest oportunity" >> $DBAPasswordFile
|
||||
else
|
||||
echo "# generated on `hostname` at time `date`" >> $DBAPasswordFile
|
||||
fi
|
||||
echo "" >> $DBAPasswordFile
|
||||
echo "# Your password can be changed to a more suitable one using the" >> $DBAPasswordFile
|
||||
echo "# @prefix@/bin/changeDBAPassword.sh script" >> $DBAPasswordFile
|
||||
|
||||
# Additional instructions for super server
|
||||
echo "" >> $DBAPasswordFile
|
||||
echo "# For superserver you will also want to check the password in the" >> $DBAPasswordFile
|
||||
echo "# daemon init routine in the file /etc/rc.d/init.d/firebird" >> $DBAPasswordFile
|
||||
|
||||
echo "" >> $DBAPasswordFile
|
||||
chmod u=r,go= $DBAPasswordFile
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Generate new sysdba password - this routine is used only in the
|
||||
# rpm file not in the install acript.
|
||||
|
||||
|
||||
generateNewDBAPassword() {
|
||||
|
||||
|
||||
# openssl generates random data.
|
||||
if [ -f /usr/bin/openssl ]
|
||||
then
|
||||
# We generate 20 random chars, strip any '/''s and get the first 8
|
||||
NewPasswd=`openssl rand -base64 20 | tr -d '/' | cut -c1-8`
|
||||
fi
|
||||
|
||||
# mkpasswd is a bit of a hassle, but check to see if it's there
|
||||
if [ -z "$NewPasswd" ]
|
||||
then
|
||||
if [ -f /usr/bin/mkpasswd ]
|
||||
then
|
||||
NewPasswd=`/usr/bin/mkpasswd -l 8`
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# So we failed to generate a new password, so keep the original
|
||||
# installed one.
|
||||
|
||||
if [ -z "$NewPasswd" ]
|
||||
then
|
||||
NewPasswd="masterkey"
|
||||
fi
|
||||
|
||||
writeNewPassword $NewPasswd
|
||||
changeInitPassword "$NewPasswd"
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Change sysdba password - this routine is interactive and is only
|
||||
# used in the install shell script not the rpm one.
|
||||
|
||||
|
||||
askUserForNewDBAPassword() {
|
||||
|
||||
OrigPasswd=""
|
||||
while [ -z "$OrigPasswd" ]
|
||||
do
|
||||
AskQuestion "Please enter current password for SYSDBA user: "
|
||||
OrigPasswd=$Answer
|
||||
|
||||
done
|
||||
|
||||
NewPasswd=""
|
||||
|
||||
while [ -z "$NewPasswd" ]
|
||||
do
|
||||
AskQuestion "Please enter new password for SYSDBA user: "
|
||||
NewPasswd=$Answer
|
||||
if [ ! -z "$NewPasswd" ]
|
||||
then
|
||||
$FBBin/gsec -user sysdba -password $OrigPasswd <<EOF
|
||||
modify sysdba -pw $NewPasswd
|
||||
EOF
|
||||
echo ""
|
||||
|
||||
writeNewPassword $NewPasswd
|
||||
changeInitPassword "$NewPasswd"
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Change sysdba password - this routine is interactive and is only
|
||||
# used in the install shell script not the rpm one.
|
||||
|
||||
|
||||
changeDBAPassword() {
|
||||
|
||||
if [ -z "$InteractiveInstall" ]
|
||||
then
|
||||
generateNewDBAPassword
|
||||
else
|
||||
askUserForNewDBAPassword
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#= Main Post ===============================================================
|
||||
|
||||
|
||||
FBRootDir=@prefix@
|
||||
FBBin=$FBRootDir/bin
|
||||
RunUser=root
|
||||
|
||||
InteractiveInstall=true
|
||||
export InteractiveInstall
|
||||
|
||||
changeDBAPassword
|
@ -0,0 +1,186 @@
|
||||
#!/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: changegdslibrarycompatibleLink.sh.in,v 1.2.2.2 2008-01-17 13:14:17 paulbeach Exp $
|
||||
#
|
||||
|
||||
|
||||
# This script allows the user to change the link on classic for the
|
||||
# client library from
|
||||
#
|
||||
# a) libfbembed.sl original classic direct connection
|
||||
# b) libfbclient.sl multithreaded client connection
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Prompt for response, store result in Answer
|
||||
|
||||
Answer=""
|
||||
|
||||
AskQuestion() {
|
||||
Test=$1
|
||||
DefaultAns=$2
|
||||
echo -n "${1}"
|
||||
Answer="$DefaultAns"
|
||||
read Answer
|
||||
|
||||
if [ -z $Answer ]
|
||||
then
|
||||
Answer=$DefaultAns
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# remove Link
|
||||
|
||||
removeLink() {
|
||||
fileName=$1
|
||||
|
||||
if [ -L $fileName ]
|
||||
then
|
||||
rm -f $fileName
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# quitIfRealFile
|
||||
# Remove the backward comparibility links for libgds.sl
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# removeLinks
|
||||
# Remove the backward comparibility links for libgds.sl
|
||||
|
||||
removeLinks() {
|
||||
removeLink @libdir@/libgds.sl
|
||||
removeLink @libdir@/libgds.sl.0
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# createLinksForBackCompatibility
|
||||
# Create links for back compatibility to InterBase and Firebird1.0
|
||||
# linked systems.
|
||||
|
||||
createLinksForBackCompatibility() {
|
||||
|
||||
# These two links are required for compatibility with existing ib programs
|
||||
# If the program had been linked with libgds.sl then this link is required
|
||||
# to ensure it loads the fb equivalent. Eventually these should be
|
||||
# optional and in a seperate rpm install. MOD 7-Nov-2002.
|
||||
|
||||
newLibrary=$FBRootDir/lib/$1
|
||||
|
||||
removeLinks
|
||||
|
||||
ln -s $newLibrary @libdir@/libgds.sl
|
||||
ln -s $newLibrary @libdir@/libgds.sl.0
|
||||
|
||||
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# printStatus
|
||||
|
||||
printStatus() {
|
||||
printStatus=`ls -l @libdir@/libgds.sl | sed 's@^.* /usr@/usr@'`
|
||||
echo $printStatus
|
||||
|
||||
}
|
||||
|
||||
|
||||
#= Main ====================================================================
|
||||
|
||||
|
||||
FBRootDir=@prefix@
|
||||
FBBin=$FBRootDir/bin
|
||||
|
||||
cat <<EOF
|
||||
For classic server there are two optional backward compatible client libraries.
|
||||
These are libfbclient.sl and libfbembed.sl.
|
||||
|
||||
libfbclient.sl) enables your client to be multithreaded but must connect to a
|
||||
database via a server.
|
||||
libfbembed.sl) 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.sl
|
||||
quitIfRealFile @libdir@/libgds.sl.0
|
||||
|
||||
|
||||
AskQuestion "Which option would you like to choose (client|embed|remove) [client] " "client"
|
||||
|
||||
case $Answer in
|
||||
embed)
|
||||
createLinksForBackCompatibility libfbembed.sl
|
||||
;;
|
||||
client)
|
||||
createLinksForBackCompatibility libfbclient.sl
|
||||
;;
|
||||
remove)
|
||||
removeLinks
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option $Answer chosen"
|
||||
;;
|
||||
esac
|
161
builds/install/arch-specific/hpux/misc/createaliasDB.sh.in
Normal file
161
builds/install/arch-specific/hpux/misc/createaliasDB.sh.in
Normal file
@ -0,0 +1,161 @@
|
||||
#! /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@firebirdsql.org>
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Prompt for response, store result in Answer
|
||||
|
||||
Answer=""
|
||||
|
||||
AskQuestion() {
|
||||
Test=$1
|
||||
DefaultAns=$2
|
||||
echo -n "${1}"
|
||||
Answer="$DefaultAns"
|
||||
read Answer
|
||||
}
|
||||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# appendAliasEntry
|
||||
# check to see if an entry already exists in the aliases.conf file
|
||||
# if it doesn't append it to the end of the file
|
||||
|
||||
appendAliasEntry() {
|
||||
aliasName=$1
|
||||
newDB=$2
|
||||
|
||||
# check if aliasName already exists
|
||||
oldLine=`grep "^$aliasName" $AliasFile`
|
||||
if [ -z $oldLine ]
|
||||
then
|
||||
# Create the alias file entry
|
||||
echo "$aliasName = $newDB" >> $AliasFile
|
||||
else
|
||||
cat <<EOF
|
||||
The alias name $aliasName already exists in $AliasFile
|
||||
with value:
|
||||
$oldLine
|
||||
|
||||
A new entry will not be created and the existing one will be used.
|
||||
EOF
|
||||
|
||||
AskQuestion "Press return to continue or ^C to abort"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# checkNameStartsWithSlash
|
||||
#
|
||||
|
||||
checkNameStartsWithSlash() {
|
||||
|
||||
name=$1
|
||||
|
||||
letter=`echo $name | cut -c1`
|
||||
|
||||
if [ $letter != "/" ]
|
||||
then
|
||||
cat <<EOF
|
||||
The file name "$name" needs to be an absolute path to the file not a
|
||||
relative path.
|
||||
|
||||
Possibly you want: `pwd`/$name
|
||||
for the path name.
|
||||
EOF
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# checkAccessToFile
|
||||
# This routine should check that the firebird user has
|
||||
# access to the file if it exists or the directory if it
|
||||
# does not.
|
||||
|
||||
checkAccessToFile() {
|
||||
fileName=$1
|
||||
|
||||
dirName=`dirname $fileName`
|
||||
|
||||
echo $fileName
|
||||
echo $dirName
|
||||
|
||||
userName=`id -un`
|
||||
if [ $userName = "root" ]
|
||||
then
|
||||
result=`su firebird -c " if [ -w $dirName ]; then echo 'Ok'; fi"`
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
#= Main Post ===============================================================
|
||||
|
||||
|
||||
FBRootDir=@prefix@
|
||||
FBBin=$FBRootDir/bin
|
||||
|
||||
if [ $# -ne 2 ]
|
||||
then
|
||||
echo "Usage is createAliasDB.sh <name> <newDB>"
|
||||
exit
|
||||
fi
|
||||
|
||||
aliasName=$1
|
||||
newDB=$2
|
||||
|
||||
AliasFile=$FBRootDir/aliases.conf
|
||||
|
||||
|
||||
checkNameStartsWithSlash $newDB
|
||||
appendAliasEntry $aliasName $newDB
|
||||
|
||||
# checkAccessToFile $newDB
|
||||
|
||||
if [ ! -f $newDB ]
|
||||
then
|
||||
#source $FBRootDir/SYSDBA.password
|
||||
$FBBin/isql <<EOF
|
||||
create database 'localhost:$aliasName';
|
||||
quit;
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
# chkconfig: 345 20 80
|
||||
# description: Start/Stop firebird database server
|
||||
#
|
||||
# This file belongs in /etc/init.d where it will be run
|
||||
# on system startup and shutdown to start the background
|
||||
# Firebird/interbase database server daemon
|
||||
|
||||
|
||||
|
||||
FIREBIRD=@prefix@
|
||||
ISC_USER=SYSDBA
|
||||
ISC_PASSWORD=masterkey
|
||||
FBRunUser=firebird
|
||||
# WARNING: in a real-world installation, you should not put the
|
||||
# SYSDBA password in a publicly-readable file.
|
||||
# Eventually this file should not need to contain any passwords.
|
||||
# as root user alone should be sufficient privledge to stop/start
|
||||
# the server.
|
||||
|
||||
|
||||
export FIREBIRD
|
||||
export ISC_USER
|
||||
export ISC_PASSWORD
|
||||
|
||||
|
||||
# Check the file is there and is executable.
|
||||
[ -x $FIREBIRD/bin/fbmgr ] || exit 0
|
||||
|
||||
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting Firebird server: "
|
||||
echo '$FIREBIRD/bin/fbmgr -start -forever' | su $FBRunUser
|
||||
RETVAL=$?
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping Firebird server: "
|
||||
$FIREBIRD/bin/fbmgr -shut
|
||||
RETVAL=$?
|
||||
# [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/identd
|
||||
;;
|
||||
status)
|
||||
RETVAL=0
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo "Usage: firebird {start|stop|status|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
93
builds/install/arch-specific/hpux/misc/hpuxLibrary.sh.in
Normal file
93
builds/install/arch-specific/hpux/misc/hpuxLibrary.sh.in
Normal file
@ -0,0 +1,93 @@
|
||||
#!/bin/sh
|
||||
|
||||
RunUser=firebird
|
||||
export RunUser
|
||||
RunGroup=firebird
|
||||
export RunGroup
|
||||
PidDir=/var/run/firebird
|
||||
export PidDir
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Add new user and group
|
||||
|
||||
TryAddGroup() {
|
||||
|
||||
AdditionalParameter=$1
|
||||
testStr=`grep firebird /etc/group`
|
||||
|
||||
if [ -z "$testStr" ]
|
||||
then
|
||||
groupadd $AdditionalParameter firebird
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
TryAddUser() {
|
||||
|
||||
AdditionalParameter=$1
|
||||
testStr=`grep firebird /etc/passwd`
|
||||
|
||||
if [ -z "$testStr" ]
|
||||
then
|
||||
useradd $AdditionalParameter -d $FBRootDir -s /bin/false \
|
||||
-c "Firebird Database Owner" -g firebird firebird
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
addFirebirdUser() {
|
||||
|
||||
TryAddGroup "-g 84 -r" >/dev/null 2>&1
|
||||
TryAddGroup "-g 84" >/dev/null 2>&1
|
||||
TryAddGroup "-r" >/dev/null 2>&1
|
||||
TryAddGroup " "
|
||||
|
||||
TryAddUser "-u 84 -r" >/dev/null 2>&1
|
||||
TryAddUser "-u 84" >/dev/null 2>&1
|
||||
TryAddUser "-r" >/dev/null 2>&1
|
||||
TryAddUser " "
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# print location of init script
|
||||
|
||||
getInitScriptLocation() {
|
||||
if [ -f /etc/rc.d/init.d/firebird ]
|
||||
then
|
||||
echo -n /etc/rc.d/init.d/firebird
|
||||
elif [ -f /etc/rc.d/rc.firebird ]
|
||||
then
|
||||
echo -n /etc/rc.d/rc.firebird
|
||||
elif [ -f /etc/init.d/firebird ]
|
||||
then
|
||||
echo -n /etc/init.d/firebird
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# stop super server if it is running
|
||||
|
||||
stopSuperServerIfRunning() {
|
||||
checkString=`ps -eaf | egrep "\b(fbserver|fbguard)\b" |grep -v grep`
|
||||
|
||||
if [ ! -z "$checkString" ]
|
||||
then
|
||||
init_d=`getInitScriptLocation`
|
||||
|
||||
if [ -x "$init_d" ]
|
||||
then
|
||||
$init_d stop
|
||||
fi
|
||||
fi
|
||||
}
|
||||
#-----------------------------------------------------------------------
|
||||
# Blank stub on HPUX - don't use openssl
|
||||
|
||||
generateNewDBAPassword() {
|
||||
echo "generateNewDBAPassword" >/dev/null 2>&1
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
#
|
||||
# Start the Firebird RDBMS ?
|
||||
#
|
||||
START_FIREBIRD="yes"
|
208
builds/install/arch-specific/hpux/super/makeinstallImage.sh.in
Normal file
208
builds/install/arch-specific/hpux/super/makeinstallImage.sh.in
Normal file
@ -0,0 +1,208 @@
|
||||
#!/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: makeinstallImage.sh.in,v 1.2.2.2 2008-01-17 13:14:22 paulbeach Exp $
|
||||
#
|
||||
|
||||
# Script to copy install files from the build/transport area
|
||||
|
||||
|
||||
# This script builds an image of the installed system into
|
||||
# the gen/buildroot directory.
|
||||
|
||||
|
||||
# Making an assumption that this program is being run in the gen directory
|
||||
BuildRootDir=..
|
||||
BuiltFBDir=./firebird # Where the just build fb exists.
|
||||
|
||||
|
||||
TargetDir=buildroot # Where we want to build the install image
|
||||
|
||||
RealRootDir=/usr/local/firebird # Where it will be installed on new machine
|
||||
FBRootDir=${RealRootDir#/} # strip off leading /
|
||||
DestDir=$TargetDir/$FBRootDir
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# copyIfExists
|
||||
# Copy file if it exists
|
||||
#
|
||||
|
||||
copyIfExists() {
|
||||
OldFile=$1
|
||||
NewFile=$2
|
||||
|
||||
if [ -f $OldFile ]
|
||||
then
|
||||
cp $OldFile $NewFile
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# copyFiles
|
||||
# This function copies all the files for a classic distribution into a
|
||||
# directory heirachy mirroring the installation.
|
||||
|
||||
copyFiles() {
|
||||
# The guts of the tranfer of files and other directories
|
||||
|
||||
if [ -d $TargetDir ]
|
||||
then
|
||||
rm -fr $TargetDir
|
||||
fi
|
||||
mkdir -p $DestDir
|
||||
mkdir $DestDir/bin
|
||||
mkdir $DestDir/examples
|
||||
mkdir $DestDir/help
|
||||
mkdir $DestDir/include
|
||||
mkdir $DestDir/intl
|
||||
mkdir $DestDir/lib
|
||||
mkdir $DestDir/doc
|
||||
mkdir $DestDir/doc/sql.extensions
|
||||
mkdir $DestDir/UDF
|
||||
mkdir $DestDir/misc
|
||||
|
||||
mkdir -p $TargetDir@libdir@
|
||||
mkdir -p $TargetDir/usr/include
|
||||
|
||||
|
||||
cp -f $BuiltFBDir/bin/fbserver $DestDir/bin/fbserver
|
||||
cp -f $BuiltFBDir/bin/fbguard $DestDir/bin/fbguard
|
||||
cp -f $BuiltFBDir/bin/fbmgr.bin $DestDir/bin/fbmgr.bin
|
||||
|
||||
cp $BuiltFBDir/bin/gbak $DestDir/bin/gbak
|
||||
cp $BuiltFBDir/bin/gdef $DestDir/bin/gdef
|
||||
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
|
||||
copyIfExists $BuiltFBDir/bin/gsplit $DestDir/bin/gsplit
|
||||
cp $BuiltFBDir/bin/gstat $DestDir/bin/gstat
|
||||
copyIfExists $BuiltFBDir/bin/security.gbak $DestDir/bin/security.gbak
|
||||
cp $BuiltFBDir/bin/isql $DestDir/bin/isql
|
||||
cp $BuiltFBDir/bin/qli $DestDir/bin/qli
|
||||
|
||||
cp $BuildRootDir/gen/install/bin/SSchangeRunUser.sh $DestDir/bin
|
||||
cp $BuildRootDir/gen/install/bin/SSrestoreRootRunUser.sh $DestDir/bin
|
||||
cp $BuildRootDir/gen/install/bin/changedbaPassword.sh $DestDir/bin
|
||||
cp $BuildRootDir/gen/install/bin/changegdslibrarycompatibleLink.sh $DestDir/bin
|
||||
cp $BuildRootDir/gen/install/bin/createaliasDB.sh $DestDir/bin
|
||||
cp $BuildRootDir/gen/install/bin/fb_config $DestDir/bin
|
||||
|
||||
cp $BuildRootDir/gen/install/misc/firebird.init.d.hpux $DestDir/misc
|
||||
cp $BuildRootDir/gen/install/misc/rc.config.firebird.hpux $DestDir/misc
|
||||
|
||||
# Copy examples only if we have them
|
||||
|
||||
exampleFiles=`find $BuiltFBDir/examples/v5 -type f -print`
|
||||
if [ -z "$exampleFiles" ]
|
||||
then
|
||||
echo "Example files have not been built!"
|
||||
else
|
||||
for i in $exampleFiles
|
||||
do
|
||||
cp $i $DestDir/examples
|
||||
done
|
||||
fi
|
||||
|
||||
copyIfExists $BuiltFBDir/help/help.gbak $DestDir/help
|
||||
cp $BuiltFBDir/help/help.fdb $DestDir/help
|
||||
|
||||
#cp -r $BuildSrcDir/doc $DestDir
|
||||
#cp -r $BuiltFBDir/doc $DestDir
|
||||
|
||||
cp $BuiltFBDir/firebird.msg $DestDir/firebird.msg
|
||||
cp $BuiltFBDir/security.fdb $DestDir/security.fdb
|
||||
|
||||
cp $BuiltFBDir/include/*.h $DestDir/include
|
||||
|
||||
|
||||
cp -f $BuiltFBDir/lib/libfbclient.sl* $DestDir/lib
|
||||
|
||||
cp -f $BuiltFBDir/lib/libib_util.sl $DestDir/lib/libib_util.sl
|
||||
|
||||
|
||||
cp $BuiltFBDir/intl/libfbintl.sl $DestDir/intl/fbintl
|
||||
cp $BuiltFBDir/UDF/ib_udf.sl $DestDir/UDF/
|
||||
cp $BuiltFBDir/UDF/fbudf.sl $DestDir/UDF/
|
||||
|
||||
# Copy the sql-declarations into the UDF-directory
|
||||
cp $BuildRootDir/src/extlib/ib_udf.sql $DestDir/UDF/
|
||||
cp $BuildRootDir/src/extlib/fbudf/fbudf.sql $DestDir/UDF/
|
||||
|
||||
|
||||
# Note that this copies files from outside the build tree.
|
||||
cp $BuildRootDir/doc/*.pdf $DestDir/doc
|
||||
cp $BuildRootDir/doc/README.* $DestDir/doc
|
||||
cp $BuildRootDir/doc/sql.extensions/README* $DestDir/doc/sql.extensions
|
||||
cp $BuildRootDir/doc/WhatsNew $DestDir/WhatsNew
|
||||
cp $BuildRootDir/doc/README.user $DestDir/README
|
||||
|
||||
# Miscellaneous config and stratup files
|
||||
cp $BuildRootDir/gen/install/misc/firebird.conf $DestDir/firebird.conf
|
||||
cp $BuildRootDir/gen/install/misc/aliases.conf $DestDir/
|
||||
|
||||
|
||||
# Create links from /usr/lib to install area.
|
||||
|
||||
origDir=`pwd`
|
||||
cd $DestDir/lib
|
||||
for i in libfb*.sl*; do ln -s /$FBRootDir/lib/$i $origDir/$TargetDir/usr/lib/$i; done
|
||||
cd $origDir
|
||||
ln -s ../../$FBRootDir/lib/libib_util.sl $TargetDir/usr/lib/libib_util.sl
|
||||
|
||||
|
||||
|
||||
# link include files to /usr/include
|
||||
for i in gds.h iberror.h ibase.h ib_util.h
|
||||
do
|
||||
ln -s ../../$FBRootDir/include/$i $TargetDir/usr/include/$i
|
||||
done
|
||||
|
||||
# (cd $DestDir; touch firebird.log;)
|
||||
|
||||
# chmod u=rw,go= firebird.log)
|
||||
# (cd $DestDir; chmod uga+rw examples/*.gdb)
|
||||
|
||||
# chown -R root:root $TargetDir
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#=== MAIN ====================================================================
|
||||
|
||||
|
||||
copyFiles
|
572
builds/install/arch-specific/hpux/super/postInstall.sh.in
Normal file
572
builds/install/arch-specific/hpux/super/postInstall.sh.in
Normal file
@ -0,0 +1,572 @@
|
||||
#!/bin/sh
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Prompt for response, store result in Answer
|
||||
|
||||
Answer=""
|
||||
|
||||
AskQuestion() {
|
||||
Test=$1
|
||||
DefaultAns=$2
|
||||
echo -n "${1}"
|
||||
Answer="$DefaultAns"
|
||||
read Answer
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# add a service line in the (usually) /etc/services or /etc/inetd.conf file
|
||||
# Here there are three cases, not found => add service line,
|
||||
# found & different => ask user to check
|
||||
# found & same => do nothing
|
||||
#
|
||||
|
||||
replaceLineInFile() {
|
||||
|
||||
FileName=$1
|
||||
newLine=$2
|
||||
oldLine=$3
|
||||
Silent=$4
|
||||
|
||||
if [ -z "$oldLine" ]
|
||||
then
|
||||
echo "$newLine" >> $FileName
|
||||
|
||||
elif [ "$oldLine" != "$newLine" ]
|
||||
then
|
||||
if [ "$Silent" != "Silent" ]
|
||||
then
|
||||
echo ""
|
||||
echo "--- Warning ----------------------------------------------"
|
||||
echo ""
|
||||
echo " In file $FileName found line: "
|
||||
echo " $oldLine"
|
||||
echo " Which differs from the expected line:"
|
||||
echo " $newLine"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# AskQuestion "Press return to update file or ^C to abort install"
|
||||
|
||||
cat $FileName | grep -v "$oldLine" > ${FileName}.tmp
|
||||
mv ${FileName}.tmp $FileName
|
||||
echo "$newLine" >> $FileName
|
||||
echo "Updated $FileName."
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Add new user and group
|
||||
TryAddGroup() {
|
||||
testStr=`grep firebird /etc/group`
|
||||
|
||||
if [ -z "$testStr" ]; then
|
||||
groupadd firebird
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
TryAddUser() {
|
||||
testStr=`grep firebird /etc/passwd`
|
||||
|
||||
if [ -z "$testStr" ]; then
|
||||
useradd -d $FBRootDir -s /bin/false \
|
||||
-c "Firebird Database Administrator" -g firebird firebird
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
addFirebirdUser() {
|
||||
TryAddGroup "-g 84 -r" >/dev/null 2>&1
|
||||
TryAddGroup "-g 84" >/dev/null 2>&1
|
||||
TryAddGroup "-r" >/dev/null 2>&1
|
||||
TryAddGroup " "
|
||||
|
||||
TryAddUser "-u 84 -r" >/dev/null 2>&1
|
||||
TryAddUser "-u 84" >/dev/null 2>&1
|
||||
TryAddUser "-r" >/dev/null 2>&1
|
||||
TryAddUser " "
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# changeInitPassword
|
||||
|
||||
changeInitPassword() {
|
||||
|
||||
NewPasswd=$1
|
||||
|
||||
InitFile=/sbin/init.d/firebird
|
||||
|
||||
if [ -f $InitFile ]
|
||||
then
|
||||
echo ""
|
||||
echo Running ex to modify /sbin/init.d/firebird
|
||||
|
||||
# to be sure that `ex' can write to file
|
||||
chmod u=rwx,g=rx,o= $InitFile
|
||||
|
||||
ex -s $InitFile <<EOF
|
||||
/ISC_PASSWORD/s/ISC_PASSWORD=.*/ISC_PASSWORD=$NewPasswd/g
|
||||
w
|
||||
q
|
||||
EOF
|
||||
chmod u=rwx,g=rx,o= $InitFile
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Write new password to the @prefix@/SYSDBA.password file
|
||||
|
||||
writeNewPassword() {
|
||||
NewPasswd=$1
|
||||
|
||||
echo "# Firebird generated password for user SYSDBA is: " > $DBAPasswordFile
|
||||
echo "" >> $DBAPasswordFile
|
||||
|
||||
echo "ISC_USER=sysdba" >> $DBAPasswordFile
|
||||
echo "ISC_PASSWD=$NewPasswd" >> $DBAPasswordFile
|
||||
echo "" >> $DBAPasswordFile
|
||||
|
||||
if [ $NewPasswd = "masterkey" ]
|
||||
then
|
||||
echo "# for install on `hostname` at time `date`" >> $DBAPasswordFile
|
||||
echo "# You should change this password at the earliest oportunity" >> $DBAPasswordFile
|
||||
else
|
||||
echo "# generated on `hostname` at time `date`" >> $DBAPasswordFile
|
||||
fi
|
||||
echo "" >> $DBAPasswordFile
|
||||
echo "# Your password can be changed to a more suitable one using the" >> $DBAPasswordFile
|
||||
echo "# @prefix@/bin/changeDBAPassword.sh script" >> $DBAPasswordFile
|
||||
|
||||
# Additional instructions for super server
|
||||
echo "" >> $DBAPasswordFile
|
||||
echo "# For superserver you will also want to check the password in the" >> $DBAPasswordFile
|
||||
echo "# daemon init routine in the file /sbin/init.d/firebird" >> $DBAPasswordFile
|
||||
|
||||
echo "" >> $DBAPasswordFile
|
||||
chmod u=r $DBAPasswordFile
|
||||
|
||||
|
||||
# Only if we have changed the password from the default do we need
|
||||
# to update the entry in the database
|
||||
|
||||
if [ $NewPasswd != "masterkey" ]
|
||||
then
|
||||
$FBBin/gsec -user sysdba -password masterkey <<EOF
|
||||
modify sysdba -pw $NewPasswd
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Generate new sysdba password - this routine is used only in the
|
||||
# rpm file not in the install acript.
|
||||
|
||||
|
||||
generateNewDBAPassword() {
|
||||
DBAPasswordFile=$FBRootDir/SYSDBA.password
|
||||
|
||||
# openssl generates random data.
|
||||
if [ -f /usr/bin/openssl ]
|
||||
then
|
||||
# We generate 20 random chars, strip any '/''s and get the first 8
|
||||
NewPasswd=`openssl rand -base64 20 | tr -d '/' | cut -c1-8`
|
||||
fi
|
||||
|
||||
# mkpasswd is a bit of a hassle, but check to see if it's there
|
||||
if [ -z "$NewPasswd" ]
|
||||
then
|
||||
if [ -f /usr/bin/mkpasswd ]
|
||||
then
|
||||
NewPasswd=`/usr/bin/mkpasswd -l 8`
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# So we failed to generate a new password, so keep the original
|
||||
# installed one.
|
||||
|
||||
if [ -z "$NewPasswd" ]
|
||||
then
|
||||
NewPasswd="masterkey"
|
||||
fi
|
||||
|
||||
writeNewPassword $NewPasswd
|
||||
changeInitPassword "$NewPasswd"
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Change sysdba password - this routine is interactive and is only
|
||||
# used in the install shell script not the rpm one.
|
||||
|
||||
|
||||
askUserForNewDBAPassword() {
|
||||
NewPasswd=""
|
||||
|
||||
echo ""
|
||||
while [ -z "$NewPasswd" ]
|
||||
do
|
||||
AskQuestion "Please enter new password for SYSDBA user: "
|
||||
NewPasswd=$Answer
|
||||
if [ ! -z "$NewPasswd" ]
|
||||
then
|
||||
echo ""
|
||||
writeNewPassword $NewPasswd
|
||||
changeInitPassword "$NewPasswd"
|
||||
fi
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Change sysdba password - this routine is interactive and is only
|
||||
# used in the install shell script not the rpm one.
|
||||
|
||||
# On some systems the mkpasswd program doesn't appear and on others
|
||||
# there is another mkpasswd which does a different operation. So if
|
||||
# the specific one isn't available then keep the original password.
|
||||
|
||||
|
||||
changeDBAPassword() {
|
||||
if [ -z "$InteractiveInstall" ]
|
||||
then
|
||||
generateNewDBAPassword
|
||||
else
|
||||
askUserForNewDBAPassword
|
||||
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() {
|
||||
|
||||
# HPUX...
|
||||
|
||||
if [ -d /sbin/init.d ]
|
||||
then
|
||||
srcScript=firebird.init.d.hpux
|
||||
initScript=/sbin/init.d/firebird
|
||||
fi
|
||||
|
||||
# Install the firebird init.d script
|
||||
cp $FBRootDir/misc/$srcScript $initScript
|
||||
chown root:root $initScript
|
||||
chmod u=rx,g=rx,o= $initScript # contains password hence no world read.
|
||||
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# startInetService
|
||||
# Now that we've installed it start up the service.
|
||||
|
||||
startInetService() {
|
||||
initScript=/sbin/init.d/firebird
|
||||
if [ ! -f $initScript ]
|
||||
then
|
||||
initScript=/sbin/init.d/firebird
|
||||
fi
|
||||
|
||||
if [ -f $initScript ]
|
||||
then
|
||||
$initScript start
|
||||
checkString=`ps -ef | grep fbserver |grep -v grep`
|
||||
|
||||
if [ -z "$checkString" ]
|
||||
then
|
||||
# server didn't start - possible reason bad shell /bin/false
|
||||
echo
|
||||
echo Fixing firebird\'s shell to /bin/sh
|
||||
echo
|
||||
usermod -s /bin/sh firebird
|
||||
$initScript start
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# UpdateHostsDotEquivFile
|
||||
# The /etc/hosts.equiv file is needed to allow local access for super server
|
||||
# from processes on the machine to port 3050 on the local machine.
|
||||
# The two host names that are needed there are
|
||||
# localhost.localdomain and whatever hostname returns.
|
||||
|
||||
updateHostsDotFile() {
|
||||
hostEquivFile=$1
|
||||
|
||||
if [ ! -f $hostEquivFile ]
|
||||
then
|
||||
touch $hostEquivFile
|
||||
chown root:root $hostEquivFile
|
||||
chmod u=rw,g=r,o=r $hostEquivFile
|
||||
fi
|
||||
|
||||
newLine="localhost"
|
||||
oldLine=`grep "^$newLine\$" $hostEquivFile`
|
||||
replaceLineInFile "$hostEquivFile" "$newLine" "$oldLine"
|
||||
|
||||
newLine="localhost.localdomain"
|
||||
oldLine=`grep "^$newLine\$" $hostEquivFile`
|
||||
replaceLineInFile "$hostEquivFile" "$newLine" "$oldLine"
|
||||
|
||||
newLine="`hostname`"
|
||||
oldLine=`grep "^$newLine\$" $hostEquivFile`
|
||||
replaceLineInFile "$hostEquivFile" "$newLine" "$oldLine"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# buildUninstallFile
|
||||
# This will work only for the .tar install and it builds an
|
||||
# uninstall shell script.
|
||||
|
||||
|
||||
buildUninstallFile() {
|
||||
cd "$origDir"
|
||||
|
||||
if [ ! -f manifest.txt ] # Only do this if we are a .tar install
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
cp manifest.txt $FBRootDir/misc
|
||||
|
||||
cp -r scripts $FBRootDir/misc/
|
||||
cp scripts/tarmainUninstall.sh $FBRootDir/bin/uninstall.sh
|
||||
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# createLinksForBackCompatibility
|
||||
# Create links for back compatibility to InterBase and Firebird1.0
|
||||
# linked systems.
|
||||
|
||||
createLinksForBackCompatibility() {
|
||||
# These two links are required for compatibility with existing ib programs
|
||||
# If the program had been linked with libgds.so then this link is required
|
||||
# to ensure it loads the fb equivalent. Eventually these should be
|
||||
# optional and in a seperate rpm install. MOD 7-Nov-2002.
|
||||
|
||||
|
||||
# Althhough classic has two options for libgds.so super server has only
|
||||
# one:
|
||||
# 1) The multithreaded client only libfbclient.so
|
||||
# MOD 23-Dec-2003
|
||||
|
||||
newLibrary=$FBRootDir/lib/libfbclient.so
|
||||
#newLibrary=$FBRootDir/lib/libfbembed.so
|
||||
|
||||
# Remove if only a link
|
||||
if [ -L @libdir@/libgds.so ]
|
||||
then
|
||||
rm -f @libdir@/libgds.so
|
||||
fi
|
||||
|
||||
if [ ! -e @libdir@/libgds.so ]
|
||||
then
|
||||
ln -s $newLibrary @libdir@/libgds.so
|
||||
fi
|
||||
|
||||
# Remove if only a link
|
||||
if [ -L @libdir@/libgds.so.0 ]
|
||||
then
|
||||
rm -f @libdir@/libgds.so.0
|
||||
fi
|
||||
|
||||
if [ ! -e @libdir@/libgds.so.0 ]
|
||||
then
|
||||
ln -s $newLibrary @libdir@/libgds.so.0
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# For security reasons most files in firebird installation are
|
||||
# root-owned and world-readable(executable) only (including firebird).
|
||||
|
||||
# For some files RunUser (firebird) must have write access -
|
||||
# lock and log are such.
|
||||
|
||||
|
||||
MakeFileFirebirdWritable() {
|
||||
FileName=$1
|
||||
chown firebird:firebird $FileName
|
||||
chmod 0644 $FileName
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# remove line from config file if it exists in it.
|
||||
|
||||
removeLineFromFile() {
|
||||
FileName=$1
|
||||
oldLine=$2
|
||||
|
||||
if [ -f $FileName ]
|
||||
then
|
||||
if [ ! -z "$oldLine" ]
|
||||
then
|
||||
cat $FileName | grep -v "$oldLine" > ${FileName}.tmp
|
||||
mv ${FileName}.tmp $FileName
|
||||
echo "Updated."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
#= Main Post ===============================================================
|
||||
# Make sure the links are in place
|
||||
if [ ! -L @prefix@ -a ! -d @prefix@ ]
|
||||
then
|
||||
# Main link and...
|
||||
ln -s $RPM_INSTALL_PREFIX/interbase @prefix@
|
||||
fi
|
||||
|
||||
origDir=`pwd`
|
||||
|
||||
FBRootDir=@prefix@
|
||||
FBBin=$FBRootDir/bin
|
||||
# RunUser=root
|
||||
RunUser=firebird
|
||||
DBAPasswordFile=$FBRootDir/SYSDBA.password
|
||||
export FBRootDir
|
||||
export FBBin
|
||||
export RunUser
|
||||
export DBAPasswordFile
|
||||
|
||||
|
||||
# Update /etc/services
|
||||
# The \n is needed, some /etc/services files are missing a trailing
|
||||
# line feed - MOD 12-Dec-2003
|
||||
|
||||
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 entries to host.equiv & hosts.allow files
|
||||
updateHostsDotFile /etc/hosts.equiv
|
||||
# updateHostsDotFile /etc/hosts.allow
|
||||
|
||||
|
||||
# remove any gds_db line in the /etc/inetd.conf
|
||||
FileName=/etc/inetd.conf
|
||||
if [ -f $FileName ]
|
||||
then
|
||||
oldLine=`grep "^gds_db" $FileName`
|
||||
|
||||
removeLineFromFile "$FileName" "$oldLine"
|
||||
fi
|
||||
|
||||
|
||||
# Get inetd to reread new init files.
|
||||
|
||||
if [ -f /var/run/inetd.pid ]
|
||||
then
|
||||
kill -HUP `cat /var/run/inetd.pid`
|
||||
fi
|
||||
|
||||
|
||||
# Update ownership of files
|
||||
if [ $RunUser = firebird ]
|
||||
then
|
||||
# Prepare firebird user
|
||||
addFirebirdUser
|
||||
fi
|
||||
|
||||
# For security reasons initially force all root:root non-writable
|
||||
chown -R root:root $FBRootDir
|
||||
chmod -R u-w,g-w,a-w $FBRootDir
|
||||
|
||||
# Prepare bin
|
||||
cd $FBBin
|
||||
|
||||
# Create the fbmgr shell script.
|
||||
cat > fbmgr <<EOF
|
||||
#!/bin/sh
|
||||
FIREBIRD=$FBRootDir
|
||||
export FIREBIRD
|
||||
exec \$FIREBIRD/bin/fbmgr.bin \$@
|
||||
EOF
|
||||
|
||||
|
||||
# Everyone may execute clients
|
||||
chmod 0555 *
|
||||
|
||||
# Shell scripts changing security attributes are for root only
|
||||
chmod 0500 *.sh
|
||||
|
||||
# These two should only be executed by firebird user.
|
||||
#fbservices=fbguard fbserver
|
||||
#chown firebird:firebird $fbserveces
|
||||
#chmod 0544 $fbservices
|
||||
|
||||
|
||||
# Lock files
|
||||
cd $FBRootDir
|
||||
|
||||
for i in isc_init1 isc_lock1 isc_event1 isc_guard1
|
||||
do
|
||||
FileName=$i.`hostname`
|
||||
touch $FileName
|
||||
MakeFileFirebirdWritable $FileName
|
||||
done
|
||||
|
||||
touch firebird.log
|
||||
MakeFileFirebirdWritable firebird.log
|
||||
|
||||
# Security database
|
||||
# Nobody besides firebird permitted to even read this file
|
||||
chown firebird:firebird security.fdb
|
||||
chmod 0600 security.fdb
|
||||
|
||||
# make examples writable by firebird
|
||||
for i in examples/*.fdb
|
||||
do
|
||||
MakeFileFirebirdWritable $i
|
||||
done
|
||||
|
||||
# Set up Firebird for run with init.d
|
||||
installInitdScript
|
||||
|
||||
|
||||
createLinksForBackCompatibility
|
||||
|
||||
buildUninstallFile
|
||||
|
||||
# start the db server so we can change the password
|
||||
startInetService
|
||||
|
||||
# Change sysdba password
|
||||
cd $FBRootDir
|
||||
changeDBAPassword
|
72
builds/install/arch-specific/hpux/super/postUninstall.sh.in
Normal file
72
builds/install/arch-specific/hpux/super/postUninstall.sh.in
Normal file
@ -0,0 +1,72 @@
|
||||
#! /bin/sh
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# remove line from config file if it exists in it.
|
||||
|
||||
removeLineFromFile() {
|
||||
FileName=$1
|
||||
oldLine=$2
|
||||
|
||||
if [ ! -z "$oldLine" ]
|
||||
then
|
||||
cat $FileName | grep -v "$oldLine" > ${FileName}.tmp
|
||||
mv ${FileName}.tmp $FileName
|
||||
echo "Updated."
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# removeLinksForBackCompatibility
|
||||
# Remove links for back compatibility to InterBase and Firebird1.0
|
||||
# linked systems.
|
||||
|
||||
removeLinksForBackCompatibility() {
|
||||
|
||||
if [ -L @libdir@/libgds.so ]
|
||||
then
|
||||
rm -f @libdir@/libgds.so
|
||||
fi
|
||||
if [ -L @libdir@/libgds.so.0 ]
|
||||
then
|
||||
rm -f @libdir@/libgds.so.0
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
#= 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 /sbin/init.d/firebird ]
|
||||
then
|
||||
rm -f /sbin/init.d/firebird
|
||||
fi
|
||||
|
||||
fi
|
217
builds/install/arch-specific/hpux/super/preInstall.sh.in
Normal file
217
builds/install/arch-specific/hpux/super/preInstall.sh.in
Normal file
@ -0,0 +1,217 @@
|
||||
#!/bin/sh
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Prompt for response, store result in Answer
|
||||
|
||||
Answer=""
|
||||
|
||||
AskQuestion() {
|
||||
Test=$1
|
||||
DefaultAns=$2
|
||||
echo -n "${1}"
|
||||
Answer="$DefaultAns"
|
||||
read Answer
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# stop super server if it is running
|
||||
# Also will only stop firebird, since that has the init script
|
||||
|
||||
|
||||
stopServerIfRunning() {
|
||||
|
||||
checkString=`ps -ef | egrep "(fbserver|fbguard)" |grep -v grep`
|
||||
|
||||
if [ ! -z "$checkString" ]
|
||||
then
|
||||
if [ -f /sbin/init.d/firebird ]
|
||||
then
|
||||
/sbin/init.d/firebird stop
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# stop server if it is running
|
||||
|
||||
|
||||
checkIfServerRunning() {
|
||||
|
||||
|
||||
stopServerIfRunning
|
||||
|
||||
|
||||
checkString=`ps -ef | egrep "(fbserver|fbguard)" |grep -v grep`
|
||||
|
||||
if [ ! -z "$checkString" ]
|
||||
then
|
||||
echo "An instance of the Firebird SuperServer seems to be running."
|
||||
echo "(the fbserver/fbguard process was detected running on your system)"
|
||||
echo "Please quit all Firebird applications and then proceed"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
checkString=`ps -ef | egrep "(fb_inet_server)" |grep -v grep`
|
||||
|
||||
if [ ! -z "$checkString" ]
|
||||
then
|
||||
echo "An instance of the Firebird Classic server seems to be running."
|
||||
echo "Please quit all interbase applications and then proceed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Stop lock manager if it is the only thing running.
|
||||
|
||||
for i in `ps -ef | egrep "fb_lock_mgr" | awk '{print $2}' `
|
||||
do
|
||||
kill $i
|
||||
done
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Run process and check status
|
||||
|
||||
|
||||
runAndCheckExit() {
|
||||
Cmd=$*
|
||||
|
||||
# echo $Cmd
|
||||
$Cmd
|
||||
|
||||
ExitCode=$?
|
||||
|
||||
if [ $ExitCode -ne 0 ]
|
||||
then
|
||||
echo "Install aborted: The command $Cmd "
|
||||
echo " failed with error code $ExitCode"
|
||||
exit $ExitCode
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Display message if this is being run interactively.
|
||||
|
||||
|
||||
displayMessage() {
|
||||
|
||||
msgText=$1
|
||||
if [ ! -z "$InteractiveInstall" ]
|
||||
then
|
||||
echo $msgText
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Archive any existing prior installed files.
|
||||
# The 'cd' stuff is to avoid the "leading '/' removed message from tar.
|
||||
# for the same reason the DestFile is specified without the leading "/"
|
||||
|
||||
|
||||
archivePriorInstallSystemFiles() {
|
||||
|
||||
oldPWD=`pwd`
|
||||
archiveFileList=""
|
||||
|
||||
cd /
|
||||
|
||||
DestFile=${FBRootDir#/} # strip off leading /
|
||||
if [ -e "$DestFile" ]
|
||||
then
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "--- Warning ----------------------------------------------"
|
||||
echo " The installation target directory: $FBRootDir"
|
||||
echo " Already contains a prior installation of Firebird."
|
||||
echo " This and files found in /usr/include and @libdir@ will be"
|
||||
echo " archived in the file : ${ArchiveMainFile}"
|
||||
echo ""
|
||||
|
||||
if [ ! -z "$InteractiveInstall" ]
|
||||
then
|
||||
AskQuestion "Press return to continue or ^C to abort"
|
||||
fi
|
||||
|
||||
if [ -e $DestFile ]
|
||||
then
|
||||
archiveFileList="$archiveFileList $DestFile"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
for i in ibase.h ib_util.h
|
||||
do
|
||||
DestFile=usr/include/$i
|
||||
if [ -e $DestFile ]
|
||||
then
|
||||
archiveFileList="$archiveFileList $DestFile"
|
||||
fi
|
||||
done
|
||||
|
||||
for i in libib_util.so libfbclient.so.1.5.0 libfbclient.so.1 libfbclient.so
|
||||
do
|
||||
DestFile=usr/lib/$i
|
||||
if [ -e $DestFile ]
|
||||
then
|
||||
archiveFileList="$archiveFileList $DestFile"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -z "$archiveFileList" ]
|
||||
then
|
||||
|
||||
displayMessage "Archiving..."
|
||||
|
||||
runAndCheckExit "tar -cvf $ArchiveMainFile $archiveFileList"
|
||||
|
||||
|
||||
displayMessage "Done."
|
||||
displayMessage "Deleting..."
|
||||
|
||||
for i in $archiveFileList
|
||||
do
|
||||
rm -rf $i
|
||||
done
|
||||
|
||||
displayMessage "Done."
|
||||
|
||||
fi
|
||||
cd $oldPWD
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#== Main Pre =================================================================
|
||||
|
||||
FBRootDir=@prefix@
|
||||
FBBin=$FBRootDir/bin
|
||||
ArchiveDateTag=`date +"%Y%m%d_%H%M"`
|
||||
ArchiveMainFile="${FBRootDir}_${ArchiveDateTag}.tar"
|
||||
|
||||
# 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
|
||||
|
74
builds/install/arch-specific/hpux/super/preUninstall.sh.in
Normal file
74
builds/install/arch-specific/hpux/super/preUninstall.sh.in
Normal file
@ -0,0 +1,74 @@
|
||||
#! /bin/sh
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# stop server if it is running
|
||||
|
||||
|
||||
stopServerIfRunning() {
|
||||
checkString=`ps -ef | egrep "(fbserver|fbguard)" |grep -v grep`
|
||||
|
||||
if [ ! -z "$checkString" ]
|
||||
then
|
||||
InitFile=/sbin/init.d/firebird
|
||||
if [ -x $InitFile ]
|
||||
then
|
||||
$InitFile stop
|
||||
fi
|
||||
fi
|
||||
|
||||
checkString=`ps -ef | egrep "(fbserver|fbguard)" |grep -v grep`
|
||||
if [ ! -z "$checkString" ]
|
||||
then
|
||||
# careful shutdown of server failed :)
|
||||
# this may be for very many reasons, therefore kill it
|
||||
killall -9 fbguard >/dev/null 2>&1
|
||||
killall -9 fbserver >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#= Main PreUn ================================================================
|
||||
|
||||
|
||||
|
||||
FBRootDir=@prefix@
|
||||
FBBin=$FBRootDir/bin
|
||||
SecurityDatabase=security.fdb
|
||||
|
||||
|
||||
stopServerIfRunning
|
||||
|
||||
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_init1* isc_event1* isc_lock1* isc_guard* firebird.log SYSDBA.password
|
||||
do
|
||||
if [ -f $i ]
|
||||
then
|
||||
rm -f $i
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
rm -f $FBBin/fbmgr
|
||||
|
||||
# testStr=`grep firebird /etc/passwd`
|
||||
# if [ ! -z "$testStr" ]
|
||||
# then
|
||||
# userdel firebird
|
||||
# fi
|
||||
#
|
||||
# testStr=`grep firebird /etc/group`
|
||||
# if [ ! -z "$testStr" ]
|
||||
# then
|
||||
# groupdel firebird
|
||||
# fi
|
48
builds/install/arch-specific/hpux/super/tarInstall.sh.in
Normal file
48
builds/install/arch-specific/hpux/super/tarInstall.sh.in
Normal file
@ -0,0 +1,48 @@
|
||||
#!/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: tarInstall.sh.in,v 1.2.2.2 2008-01-17 13:14:23 paulbeach Exp $
|
||||
#
|
||||
|
||||
# THe way this works is that the buildroot file is stored relative to the root
|
||||
# directory and a tar -xvf at root directory will restore all the files in
|
||||
# the position that we want them to be
|
||||
|
||||
OrigDir=`pwd`
|
||||
|
||||
cd /
|
||||
|
||||
tar -xvf "$OrigDir/buildroot.tar"
|
||||
|
||||
cd "$OrigDir"
|
102
builds/install/arch-specific/hpux/super/tarUninstall.sh.in
Normal file
102
builds/install/arch-specific/hpux/super/tarUninstall.sh.in
Normal file
@ -0,0 +1,102 @@
|
||||
#! /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.2.2 2008-01-17 13:14:23 paulbeach Exp $
|
||||
#
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# removeInstalledFiles
|
||||
#
|
||||
removeInstalledFiles() {
|
||||
manifestFile=$FBRootDir/misc/manifest.txt
|
||||
|
||||
if [ ! -f $manifestFile ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
origDir=`pwd`
|
||||
|
||||
cd /
|
||||
|
||||
for i in `cat $manifestFile`
|
||||
do
|
||||
if [ -f $i -o -L $i ]
|
||||
then
|
||||
rm -f $i
|
||||
#echo $i
|
||||
fi
|
||||
done
|
||||
|
||||
cd "$origDir"
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# removeUninstallFiles
|
||||
# Under the install directory remove all the empty directories
|
||||
# If some files remain then
|
||||
|
||||
removeUninstallFiles() {
|
||||
# remove the uninstall scripts files.
|
||||
#echo $FBRootDir/misc/scripts
|
||||
rm -rf $FBRootDir/misc/scripts
|
||||
rm -f $FBRootDir/misc/manifest.txt
|
||||
rm -f $FBRootDir/bin/uninstall.sh
|
||||
rm -f $FBRootDir/lib/libfbembed.sl
|
||||
rm -f $FBRootDir/lib/libfbclient.sl
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# removeEmptyDirs
|
||||
# Under the install directory remove all the empty directories
|
||||
# If some files remain then
|
||||
# This routing loops, since deleting a directory possibly makes
|
||||
# the parent empty as well
|
||||
|
||||
removeEmptyDirs() {
|
||||
|
||||
rm -fr $FBRootDir
|
||||
|
||||
}
|
||||
|
||||
|
||||
FBRootDir=/usr/local/firebird
|
||||
FBBin=$FBRootDir/bin
|
||||
|
||||
removeInstalledFiles # Remove installed files
|
||||
removeUninstallFiles # Remove the 'uninstall' utility files
|
||||
removeEmptyDirs # Remove empty directories
|
157
builds/install/arch-specific/hpux/super/tarmainInstall.sh.in
Normal file
157
builds/install/arch-specific/hpux/super/tarmainInstall.sh.in
Normal file
@ -0,0 +1,157 @@
|
||||
#!/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.2.2 2008-01-17 13:14:23 paulbeach Exp $
|
||||
#
|
||||
|
||||
# Install script for FirebirdSQL database engine
|
||||
# http://www.firebirdsql.org
|
||||
|
||||
# This is the new file !!!
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Prompt for response, store result in Answer
|
||||
|
||||
Answer=""
|
||||
|
||||
AskQuestion() {
|
||||
Test=$1
|
||||
DefaultAns=$2
|
||||
echo -n "${1}"
|
||||
Answer="$DefaultAns"
|
||||
read Answer
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Prompt for yes or no answer - returns non-zero for no
|
||||
|
||||
AskYNQuestion() {
|
||||
while echo -n "${*} (y/n): "
|
||||
do
|
||||
read answer rest
|
||||
case $answer in
|
||||
[yY]*)
|
||||
return 0
|
||||
;;
|
||||
[nN]*)
|
||||
return 1
|
||||
;;
|
||||
*)
|
||||
echo "Please answer y or n"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Run process and check status
|
||||
|
||||
|
||||
runAndCheckExit() {
|
||||
Cmd=$*
|
||||
|
||||
# echo $Cmd
|
||||
$Cmd
|
||||
|
||||
ExitCode=$?
|
||||
|
||||
if [ $ExitCode -ne 0 ]
|
||||
then
|
||||
echo "Install aborted: The command $Cmd "
|
||||
echo " failed with error code $ExitCode"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Check for a previous install
|
||||
|
||||
|
||||
checkInstallUser() {
|
||||
|
||||
if [ "`whoami`" != "root" ];
|
||||
then
|
||||
echo ""
|
||||
echo "--- Warning ----------------------------------------------"
|
||||
echo ""
|
||||
echo " You need to be 'root' user to install"
|
||||
echo ""
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
#== Main Program ==========================================================
|
||||
|
||||
|
||||
InteractiveInstall=1
|
||||
export InteractiveInstall
|
||||
|
||||
|
||||
checkInstallUser
|
||||
|
||||
BuildVersion=1.5.3.4870
|
||||
PackageVersion=0
|
||||
CpuType=hppa2.0w
|
||||
|
||||
Version="$BuildVersion-$PackageVersion.$CpuType"
|
||||
|
||||
|
||||
cat <<EOF
|
||||
|
||||
Firebird SuperServer $Version Installation
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
AskQuestion "Press Enter to start installation or ^C to abort"
|
||||
|
||||
|
||||
# Here we are installing from a install tar 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"
|
||||
|
168
builds/install/arch-specific/hpux/super/tarmainUninstall.sh.in
Normal file
168
builds/install/arch-specific/hpux/super/tarmainUninstall.sh.in
Normal file
@ -0,0 +1,168 @@
|
||||
#!/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.2.2 2008-01-17 13:14:23 paulbeach Exp $
|
||||
#
|
||||
|
||||
# Install script for FirebirdSQL database engine
|
||||
# http://www.firebirdsql.org
|
||||
|
||||
# This is the new file !!!
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Prompt for response, store result in Answer
|
||||
|
||||
Answer=""
|
||||
|
||||
AskQuestion() {
|
||||
Test=$1
|
||||
DefaultAns=$2
|
||||
echo -n "${1}"
|
||||
Answer="$DefaultAns"
|
||||
read Answer
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Prompt for yes or no answer - returns non-zero for no
|
||||
|
||||
AskYNQuestion() {
|
||||
while echo -n "${*} (y/n): "
|
||||
do
|
||||
read answer rest
|
||||
case $answer in
|
||||
[yY]*)
|
||||
return 0
|
||||
;;
|
||||
[nN]*)
|
||||
return 1
|
||||
;;
|
||||
*)
|
||||
echo "Please answer y or n"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Run process and check status
|
||||
|
||||
|
||||
runAndCheckExit() {
|
||||
Cmd=$*
|
||||
|
||||
# echo $Cmd
|
||||
$Cmd
|
||||
|
||||
ExitCode=$?
|
||||
|
||||
if [ $ExitCode -ne 0 ]
|
||||
then
|
||||
echo "Uninstall aborted: The command $Cmd "
|
||||
echo " failed with error code $ExitCode"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Check for a previous install
|
||||
|
||||
|
||||
checkInstallUser() {
|
||||
|
||||
if [ "`whoami`" != "root" ];
|
||||
then
|
||||
echo ""
|
||||
echo "--- Warning ----------------------------------------------"
|
||||
echo ""
|
||||
echo " You need to be 'root' user to run uninstall"
|
||||
echo ""
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
#== 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 SuperServer $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 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"
|
||||
|
@ -1085,6 +1085,7 @@ case "$PLATFORM" in
|
||||
HP_INSTALL_SRC_DIR=builds/install/arch-specific/hpux/${FIREBIRD_ARCH_TYPE}
|
||||
AC_CONFIG_FILES([
|
||||
gen/install/makeinstallImage.sh:${HP_INSTALL_SRC_DIR}/makeinstallImage.sh.in
|
||||
gen/firebirdCS.psf:${HP_INSTALL_SRC_DIR}/firebirdCS.psf.in
|
||||
gen/firebird/bin/preInstall.sh:${HP_INSTALL_SRC_DIR}/preInstall.sh.in
|
||||
gen/firebird/bin/tarInstall.sh:${HP_INSTALL_SRC_DIR}/tarInstall.sh.in
|
||||
gen/firebird/bin/tarmainInstall.sh:${HP_INSTALL_SRC_DIR}/tarmainInstall.sh.in
|
||||
|
Loading…
Reference in New Issue
Block a user