Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
40cd81cf
Commit
40cd81cf
authored
23 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
This is a simple patch to put double quotes around a few cases in
pg_ctl.sh which were unquoted when inside of []. Justin Clift
parent
07ce9fe6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/bin/pg_ctl/pg_ctl.sh
+11
-11
11 additions, 11 deletions
src/bin/pg_ctl/pg_ctl.sh
with
11 additions
and
11 deletions
src/bin/pg_ctl/pg_ctl.sh
+
11
−
11
View file @
40cd81cf
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.2
4
2001/09/2
1 21:10:56 tgl
Exp $
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.2
5
2001/09/2
9 03:09:32 momjian
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -238,9 +238,9 @@ POSTOPTSFILE=$PGDATA/postmaster.opts
...
@@ -238,9 +238,9 @@ POSTOPTSFILE=$PGDATA/postmaster.opts
PIDFILE
=
$PGDATA
/postmaster.pid
PIDFILE
=
$PGDATA
/postmaster.pid
if
[
"
$op
"
=
"status"
]
;
then
if
[
"
$op
"
=
"status"
]
;
then
if
[
-f
$PIDFILE
]
;
then
if
[
-f
"
$PIDFILE
"
]
;
then
PID
=
`
sed
-n
1p
$PIDFILE
`
PID
=
`
sed
-n
1p
$PIDFILE
`
if
[
$PID
-lt
0
]
;
then
if
[
"
$PID
"
-lt
0
]
;
then
PID
=
`
expr
0 -
$PID
`
PID
=
`
expr
0 -
$PID
`
echo
"
$CMDNAME
: postgres is running (pid:
$PID
)"
echo
"
$CMDNAME
: postgres is running (pid:
$PID
)"
else
else
...
@@ -256,9 +256,9 @@ if [ "$op" = "status" ];then
...
@@ -256,9 +256,9 @@ if [ "$op" = "status" ];then
fi
fi
if
[
"
$op
"
=
"stop"
-o
"
$op
"
=
"restart"
-o
"
$op
"
=
"reload"
]
;
then
if
[
"
$op
"
=
"stop"
-o
"
$op
"
=
"restart"
-o
"
$op
"
=
"reload"
]
;
then
if
[
-f
$PIDFILE
]
;
then
if
[
-f
"
$PIDFILE
"
]
;
then
PID
=
`
sed
-n
1p
$PIDFILE
`
PID
=
`
sed
-n
1p
$PIDFILE
`
if
[
$PID
-lt
0
]
;
then
if
[
"
$PID
"
-lt
0
]
;
then
PID
=
`
expr
0 -
$PID
`
PID
=
`
expr
0 -
$PID
`
echo
"
$CMDNAME
: Cannot restart postmaster. postgres is running (pid:
$PID
)"
1>&2
echo
"
$CMDNAME
: Cannot restart postmaster. postgres is running (pid:
$PID
)"
1>&2
echo
"Please terminate postgres and try again."
1>&2
echo
"Please terminate postgres and try again."
1>&2
...
@@ -274,10 +274,10 @@ if [ "$op" = "stop" -o "$op" = "restart" -o "$op" = "reload" ];then
...
@@ -274,10 +274,10 @@ if [ "$op" = "stop" -o "$op" = "restart" -o "$op" = "reload" ];then
while
:
while
:
do
do
if
[
-f
$PIDFILE
]
;
then
if
[
-f
"
$PIDFILE
"
]
;
then
$silence_echo
$ECHO_N
"."
$ECHO_C
$silence_echo
$ECHO_N
"."
$ECHO_C
cnt
=
`
expr
$cnt
+ 1
`
cnt
=
`
expr
$cnt
+ 1
`
if
[
$cnt
-gt
$wait_seconds
]
;
then
if
[
"
$cnt
"
-gt
"
$wait_seconds
"
]
;
then
$silence_echo
echo
" failed"
$silence_echo
echo
" failed"
echo
"
$CMDNAME
: postmaster does not shut down"
1>&2
echo
"
$CMDNAME
: postmaster does not shut down"
1>&2
exit
1
exit
1
...
@@ -309,7 +309,7 @@ fi # stop, restart, reload
...
@@ -309,7 +309,7 @@ fi # stop, restart, reload
if
[
"
$op
"
=
"start"
-o
"
$op
"
=
"restart"
]
;
then
if
[
"
$op
"
=
"start"
-o
"
$op
"
=
"restart"
]
;
then
oldpid
=
""
oldpid
=
""
if
[
-f
$PIDFILE
]
;
then
if
[
-f
"
$PIDFILE
"
]
;
then
echo
"
$CMDNAME
: Another postmaster may be running. Trying to start postmaster anyway."
1>&2
echo
"
$CMDNAME
: Another postmaster may be running. Trying to start postmaster anyway."
1>&2
oldpid
=
`
sed
-n
1p
$PIDFILE
`
oldpid
=
`
sed
-n
1p
$PIDFILE
`
fi
fi
...
@@ -318,7 +318,7 @@ if [ "$op" = "start" -o "$op" = "restart" ];then
...
@@ -318,7 +318,7 @@ if [ "$op" = "start" -o "$op" = "restart" ];then
if
[
-z
"
$POSTOPTS
"
]
;
then
if
[
-z
"
$POSTOPTS
"
]
;
then
if
[
"
$op
"
=
"start"
]
;
then
if
[
"
$op
"
=
"start"
]
;
then
# if we are in start mode, then look for postmaster.opts.default
# if we are in start mode, then look for postmaster.opts.default
if
[
-f
$DEFPOSTOPTS
]
;
then
if
[
-f
"
$DEFPOSTOPTS
"
]
;
then
eval set
X
"
`
cat
$DEFPOSTOPTS
`
"
;
shift
eval set
X
"
`
cat
$DEFPOSTOPTS
`
"
;
shift
fi
fi
else
else
...
@@ -343,7 +343,7 @@ if [ "$op" = "start" -o "$op" = "restart" ];then
...
@@ -343,7 +343,7 @@ if [ "$op" = "start" -o "$op" = "restart" ];then
# if had an old lockfile, check to see if we were able to start
# if had an old lockfile, check to see if we were able to start
if
[
-n
"
$oldpid
"
]
;
then
if
[
-n
"
$oldpid
"
]
;
then
sleep
1
sleep
1
if
[
-f
$PIDFILE
]
;
then
if
[
-f
"
$PIDFILE
"
]
;
then
if
[
"
`
sed
-n
1p
$PIDFILE
`
"
=
"
$oldpid
"
]
;
then
if
[
"
`
sed
-n
1p
$PIDFILE
`
"
=
"
$oldpid
"
]
;
then
echo
"
$CMDNAME
: cannot start postmaster"
1>&2
echo
"
$CMDNAME
: cannot start postmaster"
1>&2
echo
"Examine the log output."
1>&2
echo
"Examine the log output."
1>&2
...
@@ -376,7 +376,7 @@ if [ "$op" = "start" -o "$op" = "restart" ];then
...
@@ -376,7 +376,7 @@ if [ "$op" = "start" -o "$op" = "restart" ];then
else
else
$silence_echo
$ECHO_N
"."
$ECHO_C
$silence_echo
$ECHO_N
"."
$ECHO_C
cnt
=
`
expr
$cnt
+ 1
`
cnt
=
`
expr
$cnt
+ 1
`
if
[
$cnt
-gt
$wait_seconds
]
;
then
if
[
"
$cnt
"
-gt
"
$wait_seconds
"
]
;
then
$silence_echo
echo
"failed"
$silence_echo
echo
"failed"
echo
"
$CMDNAME
: postmaster does not start"
1>&2
echo
"
$CMDNAME
: postmaster does not start"
1>&2
exit
1
exit
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment