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
a08eb45c
Commit
a08eb45c
authored
25 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
More initdb cleanup
parent
24edd34d
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/initdb/initdb.sh
+16
-18
16 additions, 18 deletions
src/bin/initdb/initdb.sh
with
16 additions
and
18 deletions
src/bin/initdb/initdb.sh
+
16
−
18
View file @
a08eb45c
...
...
@@ -27,7 +27,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.7
1
1999/12/18 02:
48:53
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.7
2
1999/12/18 02:
56:01
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -65,11 +65,12 @@ then
PGPATH
=
`
echo
$0
|
sed
's,/[^/]*$,,'
`
# (dirname command is not portable)
else
# look for it in PATH ('which' command is not portable)
for
dir
in
`
echo
"
$PATH
"
|
sed
's/:/ /g'
`
;
do
for
dir
in
`
echo
"
$PATH
"
|
sed
's/:/ /g'
`
do
# empty entry in path means current dir
[
-z
"
$dir
"
]
&&
dir
=
'.'
if
[
-f
"
$dir
/
$CMDNAME
"
]
then
then
PGPATH
=
"
$dir
"
break
fi
...
...
@@ -77,9 +78,10 @@ else
fi
# Check if needed programs actually exist in path
for
prog
in
postgres pg_version
;
do
for
prog
in
postgres pg_version
do
if
[
!
-x
"
$PGPATH
/
$prog
"
]
then
then
echo
"The program
$prog
needed by
$CMDNAME
could not be found. It was"
echo
"expected at:"
echo
"
$PGPATH
/
$prog
"
...
...
@@ -111,11 +113,6 @@ template_only=0
# user.
POSTGRES_SUPERUSERNAME
=
"
$EffectiveUser
"
# Note: The sysid can be freely selected. This will probably confuse matters,
# but if your Unix user postgres is uid 48327 you might chose to start
# at 0 (or 1) in the database.
POSTGRES_SUPERUSERID
=
"
$EUID
"
Password
=
'_null_'
while
[
"$#"
-gt
0
]
...
...
@@ -225,7 +222,7 @@ then
if
[
-n
"
$MULTIBYTE
"
]
then
echo
" -e ENCODING, --pgencoding=ENCODING"
fi
fi
echo
" -?, --help "
echo
""
exit
0
...
...
@@ -237,9 +234,9 @@ fi
if
[
"
$MULTIBYTE
"
]
then
MULTIBYTEID
=
`
$PGPATH
/pg_encoding
$MULTIBYTE
`
MULTIBYTEID
=
`
$PGPATH
/pg_encoding
$MULTIBYTE
`
if
[
"
$?
"
-ne
0
]
then
then
echo
"The program pg_encoding failed. Perhaps you did not configure"
echo
"PostgreSQL for multibyte support or the program was not success-"
echo
"fully installed."
...
...
@@ -298,9 +295,10 @@ echo
if
[
-z
"
$PGLIB
"
]
then
for
dir
in
"
$PGPATH
/../lib"
"
$PGPATH
/../lib/pgsql"
;
do
for
dir
in
"
$PGPATH
/../lib"
"
$PGPATH
/../lib/pgsql"
do
if
[
-f
"
$dir
/global1.bki.source"
]
then
then
PGLIB
=
"
$dir
"
break
fi
...
...
@@ -355,7 +353,7 @@ umask 077
if
[
-f
"
$PGDATA
"
/PG_VERSION
]
then
if
[
"
$template_only
"
-eq
0
]
then
then
echo
"
$CMDNAME
: The file
$PGDATA
/PG_VERSION already exists."
echo
"This probably means initdb has already been run and the"
echo
"database system already exists."
...
...
@@ -381,7 +379,7 @@ else
mkdir
"
$PGDATA
"
/base
||
exit_nicely
fi
if
[
!
-d
"
$PGDATA
"
/pg_xlog
]
then
then
echo
"Creating database XLOG directory
$PGDATA
/pg_xlog"
mkdir
"
$PGDATA
"
/pg_xlog
||
exit_nicely
fi
...
...
@@ -448,7 +446,7 @@ then
# Gotta remove that temp file before exiting on error.
retval
=
"
$?
"
if
[
"
$noclean
"
-eq
0
]
then
then
rm
-f
"
$TEMPFILE
"
||
exit_nicely
fi
[
"
$retval
"
-ne
0
]
&&
exit_nicely
...
...
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