mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03:03 +01:00
HPUX installer
This commit is contained in:
parent
48772dd388
commit
a2b7e431b7
@ -27,7 +27,7 @@
|
||||
# Contributor(s):
|
||||
#
|
||||
#
|
||||
# $Id: Makefile.in,v 1.3.2.4 2008-12-12 13:28:34 alexpeshkoff Exp $
|
||||
# $Id: Makefile.in,v 1.3.2.5 2008-12-26 13:47:36 alexpeshkoff Exp $
|
||||
#
|
||||
ROOT=..
|
||||
|
||||
@ -77,6 +77,7 @@ Version=$(BuildVersion)-$(PackageVersion)
|
||||
|
||||
TarDir= Firebird$(ArchPrefix)-$(Version).$(CpuType)
|
||||
TarFile=Firebird$(ArchPrefix)-$(Version).$(CpuType).tar
|
||||
TgzFile=$(TarFile).gz
|
||||
DepotFile=Firebird$(ArchPrefix)-$(Version).$(CpuType).depot
|
||||
RPMFile=Firebird$(ArchPrefix)-$(Version).$(CpuType).rpm
|
||||
#DebugDir=Firebird$(ArchPrefix)-debuginfo-$(Version).$(CpuType)
|
||||
@ -100,10 +101,10 @@ depotfile: buildRoot $(DepotFile)
|
||||
$(DepotFile): buildDepot
|
||||
(cd $(GEN_ROOT); /usr/sbin/swpackage -d "| gzip -c > $(DepotFile).gz" -x media_type=tape -s $(psfFile))
|
||||
|
||||
tarfile: buildRoot $(TarFile)
|
||||
tarfile: buildRoot $(TgzFile)
|
||||
|
||||
$(TarFile) : buildTarDir
|
||||
(cd $(GEN_ROOT); tar -cvf $(TarFile) $(TarDir) && gzip $(TarFile))
|
||||
$(TgzFile) : buildTarDir
|
||||
(cd $(GEN_ROOT); tar -cvf - $(TarDir) | gzip -c >$(TgzFile))
|
||||
|
||||
#debugfile: $(DebugFile)
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
# Contributor(s):
|
||||
#
|
||||
#
|
||||
# $Id: postInstall.sh.in,v 1.3.2.4 2008-12-25 12:26:49 alexpeshkoff Exp $
|
||||
# $Id: postInstall.sh.in,v 1.3.2.5 2008-12-26 13:47:37 alexpeshkoff Exp $
|
||||
#
|
||||
|
||||
# The post install script for Firebird Classic
|
||||
@ -45,17 +45,11 @@
|
||||
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="@FB_SERVICE_NAME@ @FB_SERVICE_PORT@/tcp # Firebird SQL Database Remote Protocol"
|
||||
oldLine=`grep "^@FB_SERVICE_NAME@" $FileName`
|
||||
if [ -z "$oldLine" ]
|
||||
then
|
||||
echo "" >> $FileName
|
||||
replaceLineInFile "$FileName" "$newLine" "$oldLine"
|
||||
fi
|
||||
replaceLineInFile "$FileName" "$newLine" "^@FB_SERVICE_NAME@"
|
||||
|
||||
# add Firebird user
|
||||
if [ $RunUser = "firebird" ]
|
||||
|
@ -31,7 +31,7 @@
|
||||
# Contributor(s):
|
||||
#
|
||||
#
|
||||
# $Id: postUninstall.sh.in,v 1.3.2.2 2008-01-17 13:14:13 paulbeach Exp $
|
||||
# $Id: postUninstall.sh.in,v 1.3.2.3 2008-12-26 13:47:37 alexpeshkoff Exp $
|
||||
#
|
||||
|
||||
# The post uninstall routine for Firebird Classic.
|
||||
@ -40,12 +40,4 @@
|
||||
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
|
||||
|
@ -31,7 +31,7 @@
|
||||
# Contributor(s):
|
||||
#
|
||||
#
|
||||
# $Id: preUninstall.sh.in,v 1.2.2.2 2008-01-17 13:14:14 paulbeach Exp $
|
||||
# $Id: preUninstall.sh.in,v 1.2.2.3 2008-12-26 13:47:37 alexpeshkoff Exp $
|
||||
#
|
||||
|
||||
# The pre uninstall routines for Firebird Classic
|
||||
@ -46,7 +46,7 @@
|
||||
echo "Saved a copy of $SecurityDatabase in /tmp"
|
||||
fi
|
||||
|
||||
for i in isc_init1* isc_event1* isc_lock1* isc_guard* firebird.log SYSDBA.password
|
||||
for i in isc_*1.* firebird.log SYSDBA.password
|
||||
do
|
||||
if [ -f $i ]
|
||||
then
|
||||
|
@ -31,7 +31,7 @@
|
||||
# Contributor(s):
|
||||
#
|
||||
#
|
||||
# $Id: tarInstall.sh.in,v 1.2.2.2 2008-01-17 13:14:14 paulbeach Exp $
|
||||
# $Id: tarInstall.sh.in,v 1.2.2.3 2008-12-26 13:47:37 alexpeshkoff Exp $
|
||||
#
|
||||
|
||||
# The way this works is that the buildroot file is stored relative to the root
|
||||
@ -42,5 +42,5 @@ OrigDir=`pwd`
|
||||
|
||||
cd /
|
||||
|
||||
tar -xf $OrigDir/buildroot.tar
|
||||
tar -xof $OrigDir/buildroot.tar
|
||||
cd $OrigDir
|
||||
|
@ -31,9 +31,12 @@
|
||||
# Contributor(s):
|
||||
#
|
||||
#
|
||||
# $Id: tarUninstall.sh.in,v 1.2.2.2 2008-01-17 13:14:14 paulbeach Exp $
|
||||
# $Id: tarUninstall.sh.in,v 1.2.2.3 2008-12-26 13:47:37 alexpeshkoff Exp $
|
||||
#
|
||||
|
||||
cd $FBRootDir
|
||||
cd ..
|
||||
|
||||
removeInstalledFiles # Remove installed files
|
||||
removeUninstallFiles # Remove the 'uninstall' utility files
|
||||
removeEmptyDirs # Remove empty directories
|
||||
|
@ -7,6 +7,12 @@ export RunGroup
|
||||
PidDir=/var/run/firebird
|
||||
export PidDir
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Get correct options & misc.
|
||||
|
||||
tarExt=tar
|
||||
export tarExt
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Add new user and group
|
||||
|
||||
@ -137,6 +143,9 @@ setFilePermissions() {
|
||||
# Everyone may execute clients
|
||||
chmod a=rx *
|
||||
|
||||
# Should set owner uid to deliver locks correctly
|
||||
[ -f fb_lock_mgr ] && chmod +s fb_lock_mgr
|
||||
|
||||
# Shell scripts changing security attributes are for root only
|
||||
chmod u=rx,go= *.sh
|
||||
|
||||
|
@ -7,6 +7,18 @@ export RunGroup
|
||||
PidDir=/var/run/firebird
|
||||
export PidDir
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Get correct options & misc.
|
||||
|
||||
psOptions=ww
|
||||
export psOptions
|
||||
mktOptions=-q
|
||||
export mktOptions
|
||||
tarOptions=z
|
||||
export tarOptions
|
||||
tarExt=tar.gz
|
||||
export tarExt
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Add new user and group
|
||||
|
||||
|
@ -137,8 +137,8 @@ changeXinetdServiceUser() {
|
||||
# This just adds/replaces the service entry line
|
||||
|
||||
updateInetdEntry() {
|
||||
newLine="gds_db stream tcp nowait.30000 $RunUser $FBBin/fb_inet_server fb_inet_server # Firebird Database Remote Server"
|
||||
replaceLineInFile /etc/inetd.conf "$newLine" "^gds_db"
|
||||
newLine="@FB_SERVICE_NAME@ stream tcp nowait.30000 $RunUser $FBBin/fb_inet_server fb_inet_server # Firebird Database Remote Server"
|
||||
replaceLineInFile /etc/inetd.conf "$newLine" "^@FB_SERVICE_NAME@"
|
||||
}
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@ export FBBin
|
||||
SecurityDatabase=security2.fdb
|
||||
ArchiveDateTag=`date +"%Y%m%d_%H%M"`
|
||||
export ArchiveDateTag
|
||||
ArchiveMainFile="${FBRootDir}_${ArchiveDateTag}.tar.gz"
|
||||
ArchiveMainFile="${FBRootDir}_${ArchiveDateTag}"
|
||||
export ArchiveMainFile
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ export ArchiveMainFile
|
||||
# Create temporary file. In case mktemp failed, do something...
|
||||
|
||||
MakeTemp() {
|
||||
TmpFile=`mktemp -q /tmp/firebird_install.XXXXXX`
|
||||
TmpFile=`mktemp $mktOptions /tmp/firebird_install.XXXXXX`
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
TmpFile=/tmp/firebird_install
|
||||
@ -114,7 +114,7 @@ checkInstallUser() {
|
||||
# Works for both inetd and xinetd
|
||||
|
||||
resetInetdServer() {
|
||||
pid=`ps -efww | grep inetd | grep -v grep | awk '{print $2}'`
|
||||
pid=`ps -ef$psOptions | grep inetd | grep -v grep | awk '{print $2}'`
|
||||
if [ "$pid" ]
|
||||
then
|
||||
kill -HUP $pid
|
||||
@ -127,7 +127,7 @@ resetInetdServer() {
|
||||
# take into account possible pre-firebird xinetd services
|
||||
|
||||
removeXinetdEntry() {
|
||||
for i in `grep -l "service gds_db" /etc/xinetd.d/*`
|
||||
for i in `grep -l "service @FB_SERVICE_NAME@" /etc/xinetd.d/*`
|
||||
do
|
||||
rm -f $i
|
||||
done
|
||||
@ -139,7 +139,7 @@ removeXinetdEntry() {
|
||||
|
||||
removeInetdEntry() {
|
||||
FileName=/etc/inetd.conf
|
||||
oldLine=`grep "^gds_db" $FileName`
|
||||
oldLine=`grep "^@FB_SERVICE_NAME@" $FileName`
|
||||
removeLineFromFile "$FileName" "$oldLine"
|
||||
}
|
||||
|
||||
@ -170,10 +170,9 @@ checkIfServerRunning() {
|
||||
|
||||
stopSuperServerIfRunning
|
||||
|
||||
|
||||
# Check is server is being actively used.
|
||||
|
||||
checkString=`ps -efww| egrep "\b(fbserver|fbguard)\b" |grep -v grep`
|
||||
checkString=`ps -ef$psOptions | egrep "\b(fbserver|fbguard)\b" |grep -v grep`
|
||||
|
||||
if [ ! -z "$checkString" ]
|
||||
then
|
||||
@ -182,7 +181,7 @@ checkIfServerRunning() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
checkString=`ps -efww| egrep "\b(fb_inet_server|gds_pipe)\b" |grep -v grep`
|
||||
checkString=`ps -ef$psOptions | egrep "\b(fb_inet_server|gds_pipe)\b" |grep -v grep`
|
||||
|
||||
if [ ! -z "$checkString" ]
|
||||
then
|
||||
@ -194,7 +193,7 @@ checkIfServerRunning() {
|
||||
|
||||
# The following check for running interbase or firebird 1.0 servers.
|
||||
|
||||
checkString=`ps -efww| egrep "\b(ibserver|ibguard)\b" |grep -v grep`
|
||||
checkString=`ps -ef$psOptions | egrep "\b(ibserver|ibguard)\b" |grep -v grep`
|
||||
|
||||
if [ ! -z "$checkString" ]
|
||||
then
|
||||
@ -204,7 +203,7 @@ checkIfServerRunning() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
checkString=`ps -efww| egrep "\b(gds_inet_server|gds_pipe)\b" |grep -v grep`
|
||||
checkString=`ps -ef$psOptions | egrep "\b(gds_inet_server|gds_pipe)\b" |grep -v grep`
|
||||
|
||||
if [ ! -z "$checkString" ]
|
||||
then
|
||||
@ -218,7 +217,7 @@ checkIfServerRunning() {
|
||||
|
||||
# Stop lock manager if it is the only thing running.
|
||||
|
||||
for i in `ps -efww | grep "fb_lock_mgr" | grep -v "grep" | awk '{print $2}' `
|
||||
for i in `ps -ef$psOptions | grep "fb_lock_mgr" | grep -v "grep" | awk '{print $2}' `
|
||||
do
|
||||
kill $i
|
||||
done
|
||||
@ -286,16 +285,13 @@ replaceLineInFile() {
|
||||
oldLine=`grep "$3" $FileName`
|
||||
|
||||
if [ -z "$oldLine" ]
|
||||
then
|
||||
then
|
||||
echo "$newLine" >> "$FileName"
|
||||
elif [ "$oldLine" != "$newLine" ]
|
||||
then
|
||||
then
|
||||
MakeTemp
|
||||
grep -v "$oldLine" "$FileName" > "$TmpFile"
|
||||
echo "$newLine" >> $TmpFile
|
||||
# The \n is needed, some /etc/services files are missing a trailing
|
||||
# line feed - MOD 12-Dec-2003
|
||||
echo "" >>$TmpFile
|
||||
cp $TmpFile $FileName && rm -f $TmpFile
|
||||
echo "Updated $1"
|
||||
fi
|
||||
@ -438,7 +434,9 @@ buildUninstallFile() {
|
||||
cp manifest.txt $FBRootDir/misc
|
||||
|
||||
cp -r scripts $FBRootDir/misc/
|
||||
cp scripts/tarMainUninstall.sh $FBRootDir/bin/uninstall.sh
|
||||
[ -f scripts/tarMainUninstall.sh ] && cp scripts/tarMainUninstall.sh $FBRootDir/bin/uninstall.sh
|
||||
[ -f scripts/tarmainUninstall.sh ] && cp scripts/tarmainUninstall.sh $FBRootDir/bin/uninstall.sh
|
||||
[ -f $FBRootDir/bin/uninstall.sh ] && chmod u=rx,go= $FBRootDir/bin/uninstall.sh
|
||||
}
|
||||
|
||||
|
||||
@ -580,6 +578,8 @@ archivePriorInstallSystemFiles() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tarArc=${ArchiveMainFile}.$tarExt
|
||||
|
||||
oldPWD=`pwd`
|
||||
archiveFileList=""
|
||||
|
||||
@ -595,7 +595,7 @@ archivePriorInstallSystemFiles() {
|
||||
echo " The installation target directory: $FBRootDir"
|
||||
echo " Already contains a prior installation of InterBase/Firebird."
|
||||
echo " This and files found in /usr/include and @libdir@ will be"
|
||||
echo " archived in the file : ${ArchiveMainFile}"
|
||||
echo " archived in the file : ${tarArc}"
|
||||
echo ""
|
||||
|
||||
if [ ! -z "$InteractiveInstall" ]
|
||||
@ -653,7 +653,7 @@ archivePriorInstallSystemFiles() {
|
||||
if [ ! -z "$archiveFileList" ]
|
||||
then
|
||||
displayMessage "Archiving..."
|
||||
runAndCheckExit "tar -czf $ArchiveMainFile $archiveFileList"
|
||||
runAndCheckExit "tar -c${tarOptions}f $tarArc $archiveFileList"
|
||||
displayMessage "Done."
|
||||
|
||||
displayMessage "Deleting..."
|
||||
@ -725,10 +725,12 @@ removeEmptyDirs() {
|
||||
while [ ! -z $dirContentChanged ]
|
||||
do
|
||||
dirContentChanged=''
|
||||
for i in `find $FBRootDir -empty -type d -print`
|
||||
do
|
||||
rmdir $i
|
||||
dirContentChanged=$i
|
||||
for i in `find $FBRootDir -type d -print`; do
|
||||
ls $i/* >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rmdir $i
|
||||
dirContentChanged=$i
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d $FBRootDir ] # end loop if the FBRootDir was deleted.
|
||||
|
Loading…
Reference in New Issue
Block a user