Skip to content

Commit

Permalink
Use ydb and ydb_env_set scripts instead of gtm and gtmprofile scripts… (
Browse files Browse the repository at this point in the history
#160)

* Use ydb and ydb_env_set scripts instead of gtm and gtmprofile scripts, and ydb_ prefix environment variables

When installing YottaDB, gtm is created as a symbolic link to ydb, and
gtmprofile is a symbolic link to ydb_env_set. The default names for
global directory, database files, and journal files are changed, but
if current files exist, they are Environment setting is done with an M
program rather than with shell commands.

* [#126] More changes

* More changes after Bhaskar tried the original tarball

* Enable journaling when creating the default database

* Fix typo
  • Loading branch information
ksbhaskar authored Feb 20, 2018
1 parent 7aa0b99 commit 52822ee
Show file tree
Hide file tree
Showing 23 changed files with 416 additions and 2,102 deletions.
10 changes: 3 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -680,11 +680,8 @@ foreach(f
gtcm_run.gtc
gtcm_slist.gtc
gdedefaults.gtc
gtmcshrc.gtc
gtmprofile.gtc
gtmprofile_preV54000.gtc
gtmstart.gtc
gtmstop.gtc
ydb_env_set.gtc
ydb_env_unset.gtc
dse.hlp
gde.hlp
lke.hlp
Expand All @@ -706,8 +703,7 @@ install(FILES ${files} DESTINATION ${YDB_INSTALL_DIR})

set(scripts)
foreach(f
gtm.gtc
gtmbase.gtc
ydb.gtc
)
select_file(src ${f})
list(APPEND scripts ${src})
Expand Down
8 changes: 4 additions & 4 deletions sr_port/mumps.hlp
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@
| Error | entered at the direct | If needed, error handlers can |
| Handler | mode prompt | include appropriate error |
| | | notification to $PRINCIPAL. For |
| | The default | example, the gtmprofile script sets |
| | The default | example, the ydb_set_env script sets |
| | $ZTRAP="B" brings a | a default $ETRAP value of |
| | process to the Direct | "Write:(0=$STACK) ""Error occurred: |
| | Mode for debugging. | "",$ZStatus,!" which you can |
Expand Down Expand Up @@ -20730,9 +20730,9 @@

The environment variable gtm_etrap specifies an initial value of $ETRAP to
override the default value of "B" for $ZTRAP as the base level error
handler. The gtmprofile script sets gtm_etrap to "Write:(0=$STACK) ""Error
occurred: "",$ZStatus,!" which you can customize to suit your needs. For
more information, refer to "Processing Errors".
handler. The ydbenv "percent" utility sets gtm_etrap to
"Write:(0=$STACK) ""Error occurred: "",$ZStatus,!" which you can customize
to suit your needs. For more information, refer to "Processing Errors".

2 Program_Handling_of_Errors
Program Handling of Errors
Expand Down
41 changes: 0 additions & 41 deletions sr_unix/badd.txt

This file was deleted.

85 changes: 0 additions & 85 deletions sr_unix/bdelete.txt

This file was deleted.

13 changes: 9 additions & 4 deletions sr_unix/configure.gtc
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ fi
binaries="mupip mumps libyottadb$ext lke dse geteuid ftok semstat2"

# Normal scripts - executed by anyone
nscripts="gtmbase lowerc_cp"
nscripts="lowerc_cp"

# Root scripts - only executed by root
rscripts="gtmstart gtmstop"
rscripts=""
if [ $deliver_gtcm = "yes" ]; then
rscripts="$rscripts gtcm_run gtcm_slist"
binaries="$binaries gtcm_server gtcm_pkdisp gtcm_play gtcm_shmclean"
Expand All @@ -95,7 +95,7 @@ hlpfiles="*help.dat *help.gld *.h"
ofiles="$hlpfiles"

# Files that need to have $ydb_dist, $echo, etc. set in them.
pathmods="gtmbase.gtc gtmstart.gtc gtmstop.gtc gtmcshrc.gtc gtmprofile.gtc gtm.gtc gtmprofile_preV54000.gtc gdedefaults.gtc"
pathmods="ydb.gtc ydb_env_set.gtc ydb_env_unset.gtc gdedefaults.gtc"

if [ $deliver_gtcm = "yes" ]; then
pathmods="$pathmods gtcm_run.gtc gtcm_slist.gtc"
Expand Down Expand Up @@ -428,6 +428,7 @@ cat << SEDSCRIPT > sedin$$
s|ARCH|$arch|g
s|ECHO|"$echo"|g
s|GTMDIST|${install_dest}|g
s|YDBDIST|${install_dest}|g
s|SERVERID|$server_id|g
SEDSCRIPT
for i in $pathmods
Expand All @@ -450,8 +451,12 @@ fi

# Install libgtmshr.so as a soft link to libyottadb.so for backward compatibility purposes just in case
ln -s ./libyottadb$ext $ydbdist/libgtmshr$ext || echo ln -s ./libyottadb$ext $ydbdist/libgtmshr$ext
ln -s ./ydb_env_set $ydbdist/gtmprofile || echo ln -s ./ydb_env_set $ydbdist/gtmprofile
ln -s ./ydb $ydbdist/gtm || echo ln -s ./ydb $ydbdist/gtm
if [ "$doutf8" -ne 0 ]; then
ln -s ./libyottadb$ext $ydbdist/utf8/libgtmshr$ext || echo ln -s ./libyottadb$ext $ydbdist/utf8/libgtmshr$ext
ln -s ./ydb_env_set $ydbdist/utf8/gtmprofile || echo ln -s ./ydb_env_set $ydbdist/utf8/gtmprofile
ln -s ./ydb $ydbdist/utf8/gtm || echo ln -s ./ydb $ydbdist/utf8/gtm
fi

# Install COPYING as well as README.md (YottaDB) or README.txt (GT.M) if it is applicable
Expand Down Expand Up @@ -483,7 +488,7 @@ do
fi
done

for i in gtmprofile gtmprofile_preV54000 gtm gtmcshrc
for i in ydb ydb_env_set ydb_env_unset gtmcshrc
do
if [ -e $i ]; then
cp -p $i $ydbdist
Expand Down
Loading

0 comments on commit 52822ee

Please sign in to comment.