From 58db61b19c5dfea5561c3343e21c054d15a4ae05 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Tue, 22 Apr 2008 09:26:55 +0000 Subject: [PATCH] Fixed CORE-1826: changeRunUser.sh and restoreRootRunUser.sh scripts do not change run user in init.d script --- builds/install/arch-specific/linux/misc/linuxLibrary.sh.in | 1 + builds/install/misc/changeRunUser.sh.in | 2 +- builds/install/misc/posixLibrary.sh.in | 2 +- builds/install/misc/restoreRootRunUser.sh.in | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in b/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in index a98fc3f192..1fbef34241 100644 --- a/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in +++ b/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in @@ -128,6 +128,7 @@ stopSuperServerIfRunning() { if [ -x "$init_d" ] then $init_d stop + sleep 1 fi fi } diff --git a/builds/install/misc/changeRunUser.sh.in b/builds/install/misc/changeRunUser.sh.in index 7ddd7cf5cd..2270628545 100644 --- a/builds/install/misc/changeRunUser.sh.in +++ b/builds/install/misc/changeRunUser.sh.in @@ -26,7 +26,7 @@ fi # Update the /etc/inetd.conf or xinetd entry or /etc/init.d/firebird echo "Updating /etc file(s)" updateInetdServiceEntry -changeInitRunUser +changeInitRunUser $RunUser # Update ownership and SUID bits for programs. echo "Updating $FBRootDir" diff --git a/builds/install/misc/posixLibrary.sh.in b/builds/install/misc/posixLibrary.sh.in index 27ac947415..2a53f8c524 100644 --- a/builds/install/misc/posixLibrary.sh.in +++ b/builds/install/misc/posixLibrary.sh.in @@ -312,7 +312,7 @@ editFile() { Starting=$2 NewLine=$3 - AwkProgram="(\$1 == \"$Starting\") {\$0=\"$NewLine\"} {print \$0}" + AwkProgram="(/^$Starting.*/ || \$1 == \"$Starting\") {\$0=\"$NewLine\"} {print \$0}" MakeTemp awk "$AwkProgram" <$FileName >$TmpFile && mv $TmpFile $FileName || rm -f $TmpFile } diff --git a/builds/install/misc/restoreRootRunUser.sh.in b/builds/install/misc/restoreRootRunUser.sh.in index 21d072d29e..80a6ea3727 100644 --- a/builds/install/misc/restoreRootRunUser.sh.in +++ b/builds/install/misc/restoreRootRunUser.sh.in @@ -26,7 +26,7 @@ fi # Update the /etc/inetd.conf or xinetd entry or /etc/init.d/firebird echo "Updating /etc file(s)" updateInetdServiceEntry -changeInitRunUser +changeInitRunUser $RunUser # Update ownership and SUID bits for programs. echo "Updating $FBRootDir"