8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 19:23:03 +01:00
firebird-mirror/builds/install/arch-specific/solaris/CS/postinstall.in

70 lines
2.4 KiB
Bash

#!/bin/sh
#
#------------------------------------------------------------------------------
# $Copyright:
# Copyright (C) Siemens Nixdorf Informationssysteme AG 1994 - 1998
# Copyright (C) Siemens AG 1998 1999
# Copyright (C) Fujitsu Siemens Computers GmbH 1999 - 2002
# All rights reserved
# $
#------------------------------------------------------------------------------
FIREBIRD=@prefix@
cd $FIREBIRD
# Create lock files
HOSTNAME=`uname -n`
VERSION=`uname -r`
for i in isc_init1 isc_lock1 isc_event1
do
file=${i}.${HOSTNAME}
touch ${file}
chmod 666 ${file}
done
# Create log
touch firebird.log
chmod 666 firebird.log
#
# If TCP is installed, update both services and servers databases
#
if [ -f /etc/inet/services ]; then
grep -s @FB_SERVICE_NAME@ /etc/inet/services >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo "Patching /etc/inet/services..."
echo "@FB_SERVICE_NAME@ @FB_SERVICE_PORT@/tcp # Firebird2 Database Remote Protocol" >>/etc/inet/services
fi
fi
if [ -f /etc/inet/inetd.conf ]; then
grep -s @FB_SERVICE_NAME@ /etc/inet/inetd.conf >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo "Patching /etc/inet/inetd.conf..."
echo "" >> /etc/inet/inetd.conf
echo "# Firebird2 Database Remote Server" >> /etc/inet/inetd.conf
echo "@FB_SERVICE_NAME@ stream tcp nowait root $FIREBIRD/bin/fb_inet_server fb_inet_server" >>/etc/inet/inetd.conf
echo "Restarting inetd..."
kill -HUP `ps -e | grep inetd | awk '{print $1}'`
fi
fi
if [ $VERSION="5.10" ]; then
inetconv -f
svcadm clear svc:/network/gds_db/tcp:default
fi
if [ -f /etc/profile ]; then
grep -s "# Enhance PATH for Firebird2" /etc/profile >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo "Patching /etc/profile..."
echo "# Enhance PATH for Firebird2" >>/etc/profile
echo "PATH=\$PATH:$FIREBIRD/bin" >>/etc/profile
echo "export PATH" >>/etc/profile
echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$FIREBIRD/lib:$FIREBIRD/intl" >>/etc/profile
echo "export LD_LIBRARY_PATH" >>/etc/profile
echo "INTERBASE=$FIREBIRD" >>/etc/profile
echo "export INTERBASE" >>/etc/profile
fi
fi
# EOF