0ec9572a95
Firebird is a relational database offering many ANSI SQL-99 features that runs on Linux, Windows, and a variety of Unix platforms. Firebird offers excellent concurrency, high performance, and powerful language support for stored procedures and triggers. It has been used in production systems, under a variety of names since 1981. Firebird is completely free of any registration, licensing or deployment fees. It may be deployed freely for use with any third-party software, whether commercial or not. WWW: http://sourceforge.net/projects/firebird/ WWW: http://www.firebirdsql.org/ PR: 152402 Submitted by: Max Kochubey <root at hangover.org.ru>
71 lines
1.3 KiB
Bash
71 lines
1.3 KiB
Bash
#!/bin/sh
|
|
|
|
# $FreeBSD: /tmp/pcvs/ports/databases/firebird21-server/files/pkg-install.in,v 1.1 2010-12-20 09:05:05 acm Exp $
|
|
|
|
PATH=/bin:/usr/bin:/usr/sbin
|
|
|
|
case $2 in
|
|
PRE-INSTALL)
|
|
|
|
if [ `id -u` -ne 0 ]; then
|
|
echo; echo "You must be root to run this step!"; echo; echo
|
|
exit 1
|
|
fi
|
|
|
|
nofbuid=0
|
|
fbUID=`id -u firebird 2>/dev/null`
|
|
if [ $? -ne 0 ]; then
|
|
fbUID=90
|
|
while [ ! -z `id -un $fbUID 2>/dev/null` ]
|
|
do
|
|
fbUID=$(($fbUID+1))
|
|
done
|
|
nofbuid=1
|
|
fi
|
|
|
|
fbGID=`pw groupshow firebird 2>/dev/null`
|
|
if [ $? -ne 0 ]; then
|
|
fbGID=90
|
|
while [ ! -z `id -gn $fbGID 2>/dev/null` ]
|
|
do
|
|
fbGID=$(($fbGID+1))
|
|
done
|
|
echo "firebird:*:$fbGID:" >> /etc/group
|
|
else
|
|
fbGID=`echo $fbGID | awk -F: '{print $3}'`
|
|
fi
|
|
|
|
echo "firebird user using uid $fbUID"
|
|
echo "firebird user using gid $fbGID"
|
|
|
|
if which -s pw; then
|
|
if [ $nofbuid -ne 0 ]; then
|
|
pw useradd firebird -u $fbUID -g $fbGID -h - -s /usr/sbin/nologin \
|
|
-d /nonexistent -c "Firebird Database Administrator"
|
|
fi
|
|
else
|
|
echo -n "unable to create user firebird - please create it manually,"
|
|
echo " before reinstalling this package."
|
|
exit 1
|
|
fi
|
|
;;
|
|
|
|
POST-INSTALL)
|
|
cd /var/db/firebird
|
|
|
|
# Lock files
|
|
|
|
for i in isc_init1 isc_lock1 isc_event1
|
|
do
|
|
FileName=$i.`hostname`
|
|
touch $FileName
|
|
chmod uga=rw $FileName
|
|
chown firebird:firebird $FileName
|
|
done
|
|
|
|
touch firebird.log
|
|
chown firebird:firebird firebird.log security2.fdb
|
|
|
|
;;
|
|
|
|
esac
|