Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
a08eb45c
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a08eb45c
编写于
12月 18, 1999
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More initdb cleanup
上级
24edd34d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
18 deletion
+16
-18
src/bin/initdb/initdb.sh
src/bin/initdb/initdb.sh
+16
-18
未找到文件。
src/bin/initdb/initdb.sh
浏览文件 @
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录