From cbc732f0ad4978101ae4de808698b4dcc8519b6f Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Tue, 11 May 2010 12:08:29 +0000 Subject: [PATCH] Bacpported fix for CORE-3001: Install fails to create user & group "firebird" --- builds/install/misc/posixLibrary.sh.in | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/builds/install/misc/posixLibrary.sh.in b/builds/install/misc/posixLibrary.sh.in index 89367bd794..e50d7651c5 100644 --- a/builds/install/misc/posixLibrary.sh.in +++ b/builds/install/misc/posixLibrary.sh.in @@ -1,6 +1,19 @@ #!/bin/sh +#------------------------------------------------------------------------ +# Adds parameter to $PATH if it's missing in it + +Add2Path() { + Dir=${1} + x=`echo :${PATH}: | grep :$Dir:` + if [ -z "$x" ] + then + PATH=$PATH:$Dir + export PATH + fi +} + #------------------------------------------------------------------------ # Global stuff init @@ -16,7 +29,9 @@ ArchiveDateTag=`date +"%Y%m%d_%H%M"` export ArchiveDateTag ArchiveMainFile="${FBRootDir}_${ArchiveDateTag}.tar.gz" export ArchiveMainFile - +#this solves a problem with sudo env missing sbin +Add2Path /usr/sbin +Add2Path /sbin #------------------------------------------------------------------------ # Create temporary file. In case mktemp failed, do something...