8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 21:23:04 +01:00
firebird-mirror/builds/install/arch-specific/linux/super/postuninstall.sh.in
2003-09-08 19:31:12 +00:00

33 lines
596 B
Bash

#! /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
}
#= Main PostUn ===============================================================
# Update /etc/services
FileName=/etc/services
oldLine=`grep "^gds_db" $FileName`
removeLineFromFile "$FileName" "$oldLine"