Merge lp:~jontai/openvista-gtm-integration/bug336166 into lp:openvista-gtm-integration

Proposed by Jon Tai
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jontai/openvista-gtm-integration/bug336166
Merge into: lp:openvista-gtm-integration
Diff against target: 1800 lines (+801/-257)
33 files modified
docs/man1/ovbackup.1 (+13/-3)
docs/man1/ovcheckperms.1 (+4/-4)
docs/man1/ovgetvar.1 (+51/-0)
docs/man1/ovimport.1 (+42/-18)
docs/man8/ovrestore.8 (+17/-7)
mumps/ZCD.m (+26/-13)
mumps/ZTMGRSET.m (+7/-5)
packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/changelog (+9/-0)
packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/openvista-utils.dirs (+1/-0)
packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/openvista-utils.manpages (+2/-0)
packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/rules (+12/-12)
packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/changelog (+9/-0)
packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/openvista-utils.dirs (+1/-0)
packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/openvista-utils.manpages (+2/-0)
packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/rules (+12/-12)
packages/rpm/CentOS/5/openvista-gtm-integration.spec (+7/-1)
scripts/etc/bash_completion.d/openvista (+60/-13)
scripts/etc/cron.daily/openvista (+4/-4)
scripts/etc/init.d/openvista (+2/-9)
scripts/etc/init.d/openvista-databases (+3/-9)
scripts/usr/bin/ovbackup (+22/-7)
scripts/usr/bin/ovcheckperms (+5/-1)
scripts/usr/bin/ovgetvar (+104/-0)
scripts/usr/bin/ovimport (+78/-28)
scripts/usr/lib/openvista/functions (+77/-16)
scripts/usr/sbin/ovinstanceadd (+5/-60)
scripts/usr/sbin/ovrestore (+75/-8)
scripts/usr/share/munin/plugins/openvista_databases_ (+2/-9)
scripts/usr/share/munin/plugins/openvista_locks_ (+2/-9)
scripts/usr/share/munin/plugins/openvista_processes_ (+2/-9)
scripts/usr/share/openvista/backups.conf (+26/-0)
scripts/usr/share/openvista/env (+96/-0)
scripts/usr/share/openvista/journals.conf (+23/-0)
To merge this branch: bzr merge lp:~jontai/openvista-gtm-integration/bug336166
Reviewer Review Type Date Requested Status
jeff.apple Approve
Review via email: mp+16359@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jon Tai (jontai) wrote :

This branch makes a large number of changes, so I'm putting it up for review early while I finish testing it. I don't anticipate any more big changes, but I might have to fix a thing or two if I find problems.

Revision history for this message
jeff.apple (jeff-apple) wrote :

Nice changes. I saw no problems.

review: Approve
145. By Jon Tai

add a warning in the sample env file

146. By Jon Tai

older versions of rsync (like the version that ships with RHEL5, 2.6.8) don't support the --out-format argument, so work around it by passing -v and greping for .m files ourselves

147. By Jon Tai

improve performance of ovimport by having mumps read the compile list file directly; this saves thousands of process invocations and about 3 minutes when importing OpenVista Server

148. By Jon Tai

Fix a bug where $user would be undefined in /etc/cron.daily/openvista. This occurs because list_openvista_instances is executed in a subshell, so variables set during its invocation aren't set in the parent shell.

Revision history for this message
Jon Tai (jontai) wrote :

OK I'm done with my testing. I tested KIDS builds on a routine-tiered installation and it worked fine. I also found a few OV utility regressions and fixed them.

In my testing, I noticed that the current version of VPE is unable to handle routine tiers (errors occur when saving routines), but I think this branch is large enough -- there are other people in the community working on VPE anyway, so it's likely that we will be able to just grab a new version of VPE and things will just work.

Jeff, can I get one more ACK before I merge?

149. By Jon Tai

look for FROM routine in the right directory

150. By Jon Tai

Separate TO/FROM (which are passed in as names of routines, e.g., %ZTM0) and SRC/DST which are full paths. This way, the call to ZLINK is given an argument like _ZTM0 instead of /path/to/_ZTM0.m. When called with the latter, ZLINK puts the .o file in /pat/to/ instead of the configured routines directory, which isn't what we want.

Revision history for this message
Jon Tai (jontai) wrote :

Oops, forgot to test ZTMGRSET. I did, and found that it's not pulling routines from the correct source directory when it's doing copies. Fixed that, plus an old bug (never filed) that caused .o files to be placed in the routines directory.

Revision history for this message
jeff.apple (jeff-apple) wrote :

If this tests out OK, then I see no problems.

As for VPE, they should be using kernel routines, right? If there's something that varies between implementations that isn't addressed in the kernel, then perhaps the kernel needs some addintions. That's way, way, way beyond the scope of this bug, though.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'docs/man1/ovbackup.1'
--- docs/man1/ovbackup.1 2009-12-01 21:55:02 +0000
+++ docs/man1/ovbackup.1 2009-12-21 19:35:21 +0000
@@ -1,6 +1,6 @@
1.TH ovbackup 1 "1 Dec 2009" Linux "User Manuals"1.TH ovbackup 1 "10 Dec 2009" Linux "User Manuals"
2.SH NAME2.SH NAME
3ovbackup \- backs up routines and globals of an OpenVista instance3ovbackup \- back up routines and globals of an OpenVista instance
4.SH SYNOPSIS4.SH SYNOPSIS
5.B ovbackup [-h] [-V] [-q]5.B ovbackup [-h] [-V] [-q]
6.I instance_name6.I instance_name
@@ -8,7 +8,17 @@
8Each invocation of8Each invocation of
9.B ovbackup9.B ovbackup
10creates a consistent snapshot of the routines and globals of an OpenVista10creates a consistent snapshot of the routines and globals of an OpenVista
11instance. Backups are compressed with tar/bz2 and stored in the 11instance. The
12.I mumps.gld
13global directory file in the
14.I globals
15directory of the instance is also included in the backup, as is the
16.I env
17file in the
18.I etc
19directory of the instance, if it exists. If any of these files or directories
20are symlinks, the symlink targets are backed up instead of the symlinks
21themselves. Backups are compressed with tar/bzip2 and stored in the
12.I backups22.I backups
13directory of an OpenVista instance. The md5 checksum of the compressed backup23directory of an OpenVista instance. The md5 checksum of the compressed backup
14file is computed and stored in a separate file.24file is computed and stored in a separate file.
1525
=== modified file 'docs/man1/ovcheckperms.1'
--- docs/man1/ovcheckperms.1 2009-12-01 21:58:29 +0000
+++ docs/man1/ovcheckperms.1 2009-12-21 19:35:21 +0000
@@ -1,4 +1,4 @@
1.TH ovcheckperms 1 "1 Dec 2009" Linux "User Manuals"1.TH ovcheckperms 1 "11 Dec 2009" Linux "User Manuals"
2.SH NAME2.SH NAME
3ovcheckperms \- verify permissions3ovcheckperms \- verify permissions
4.SH SYNOPSIS4.SH SYNOPSIS
@@ -6,9 +6,9 @@
6.I instance_name6.I instance_name
7.SH DESCRIPTION7.SH DESCRIPTION
8.B ovcheckperms8.B ovcheckperms
9script verifies that all files and directories in an OpenVista instance have9verifies that all files and directories in an OpenVista instance have the
10the correct permissions. Incorrect permissions are written to stdout and10correct permissions. Incorrect permissions are written to stdout and logged to
11logged to syslog.11syslog.
12.PP12.PP
13The13The
14.I /etc/cron.daily/openvista14.I /etc/cron.daily/openvista
1515
=== added file 'docs/man1/ovgetvar.1'
--- docs/man1/ovgetvar.1 1970-01-01 00:00:00 +0000
+++ docs/man1/ovgetvar.1 2009-12-21 19:35:21 +0000
@@ -0,0 +1,51 @@
1.TH ovgetvar 1 "11 Dec 2009" Linux "User Manuals"
2.SH NAME
3ovgetvar \- get GT.M environment variable
4.SH SYNOPSIS
5.B ovgetvar [-h] [-V]
6.I instance_name
7.I gtm_dist|gtm_path|gtmroutines|gtmgbldir
8.SH DESCRIPTION
9.B ovgetvar
10prints the effective values of
11.I $gtm_dist
12,
13.I $gtmroutines
14, and
15.I $gtmgbldir
16for the specified OpenVista instance. It works by calling set_gtm_env, the
17function that all of the OpenVista utilities use to set their environment, then
18printing out the value of the requested variable.
19.PP
20If
21.I gtm_path
22is requested and
23.I $gtm_dist
24is a symlink,
25.B ovgetvar
26tries to follow the symlink and prints out the real path to GT.M.
27.PP
28The ZCD routine in OpenVista Server is the main user of this utility, although
29it can be used by an administrator to inspect an OpenVista instance's
30configuration.
31.PP
32.SH OPTIONS
33.IP -h
34display help text and exit
35.IP -V
36display version information and exit
37.SH "EXIT VALUES"
38.IP 0
39Success
40.IP 1
41Permission denied or other error
42.IP 2
43Invalid command syntax
44.IP 3
45Invalid argument to option
46.SH "REPORTING BUGS"
47Please report any bugs you encounter at
48.PP
49https://bugs.launchpad.net/openvista-gtm-integration
50.SH AUTHOR
51Jonathan Tai <jon.tai@medsphere.com>
052
=== modified file 'docs/man1/ovimport.1'
--- docs/man1/ovimport.1 2009-12-01 21:55:02 +0000
+++ docs/man1/ovimport.1 2009-12-21 19:35:21 +0000
@@ -1,8 +1,10 @@
1.TH ovimport 1 "1 Dec 2009" Linux "User Manuals"1.TH ovimport 1 "10 Dec 2009" Linux "User Manuals"
2.SH NAME2.SH NAME
3ovimport \- imports routines and globals into a new OpenVista instance3ovimport \- import routines and globals into an OpenVista instance
4.SH SYNOPSIS4.SH SYNOPSIS
5.B ovimport [-h] [-V] [-q] [-f] [-c 5.B ovimport [-h] [-V] [-q] [-f] [-t
6.I target
7.B ] [-c
6.I imported|all|none8.I imported|all|none
7.B ] [-r 9.B ] [-r
8.I routines10.I routines
@@ -12,18 +14,34 @@
12.I instance_name14.I instance_name
13.SH DESCRIPTION15.SH DESCRIPTION
14.B ovimport16.B ovimport
15imports routines and globals into a new OpenVista instance. Routines can be in17imports routines and globals into an OpenVista instance.
16a %RO-format file, or loose .m files in a directory. In the latter case,18.PP
17specify the directory containing the .m files after the -r flag; do not specify19Routines can be in a %RO-format file or loose .m files in a directory. In the
18the .m files themselves. Globals can be in a %GO-format file or a ZWR-format20latter case, specify the directory containing the .m files after the -r flag;
19file. Files with DOS-style line endings are converted to UNIX-style line21do not specify the .m files themselves. By default, routines are imported into
20endings automagically; GT.M does not handle DOS-style line endings natively.22the
21Line ending conversion requires enough free space in the target instance's 23.I routines
24subdirectory of the OpenVista instance. Use the -t flag to specify an
25alternate directory if $gtmroutines has been overridden in the instance's
26.I env
27file. The -t flag was added in
28.B ovimport
290.8.7.
30.PP
31Globals can be in a %GO-format file or a ZWR-format file.
32.PP
33Files with DOS-style line endings are converted to UNIX-style line endings by
34.B ovimport
35automagically; GT.M does not handle DOS-style line endings natively. Line
36ending conversion requires enough free space in the target instance's
22.I tmp37.I tmp
23directory to hold a copy of the files to be imported. Support for compressed38directory to hold a copy of the files to be imported. Support for compressed
24files is planned in a future version.39files is planned for a future version.
25.PP40.PP
26.B ovimport41.B ovimport
42is primarily used to import routines and globals into a new OpenVista instance.
43By default,
44.B ovimport
27checks to see if the target instance has any routines or database transactions.45checks to see if the target instance has any routines or database transactions.
28If either are found, the instance is assumed to not be new and 46If either are found, the instance is assumed to not be new and
29.B ovimport47.B ovimport
@@ -36,15 +54,19 @@
36flag is given, although imported routines and globals will overwrite any54flag is given, although imported routines and globals will overwrite any
37routines or globals with the same name.55routines or globals with the same name.
38.PP56.PP
39Routines are compiled after the routines are imported. By default, only57Routines are compiled after they are imported. By default, only imported
40imported routines are compiled. You should use 58routines are compiled. Use
41.B -c all 59.B -c all
42if you want to recompile all routines or 60to recompile all routines or
43.B -c none 61.B -c none
44if you do not want to compile any routines. Journaling is temporarily disabled62to skip routine compilation. The -c flag was added in
45during the global import to improve performance, unless the 63.B ovimport
640.8.7.
65.PP
66Journaling is temporarily disabled during the global import to improve
67performance, unless the
46.B -f68.B -f
47flag was given. This is safe to do because the database is guaranteed to be69flag is given. This is safe to do because the database is guaranteed to be
48empty before the import, so even if the system crashes and the database is70empty before the import, so even if the system crashes and the database is
49destroyed, the database can be recreated and71destroyed, the database can be recreated and
50.B ovimport72.B ovimport
@@ -70,6 +92,8 @@
70quiet; suppress status messages92quiet; suppress status messages
71.IP -f93.IP -f
72force; import routines and globals even if target instance is not empty94force; import routines and globals even if target instance is not empty
95.IP -t
96target; directory to import routines into (defaults to routines subdirectory of instance)
73.IP -c97.IP -c
74compile imported routines only (the default), all routines, or no routines98compile imported routines only (the default), all routines, or no routines
75.IP -r99.IP -r
76100
=== modified file 'docs/man8/ovrestore.8'
--- docs/man8/ovrestore.8 2009-12-01 21:55:02 +0000
+++ docs/man8/ovrestore.8 2009-12-21 19:35:21 +0000
@@ -1,4 +1,4 @@
1.TH ovrestore 8 "1 Dec 2009" Linux "User Manuals"1.TH ovrestore 8 "10 Dec 2009" Linux "User Manuals"
2.SH NAME2.SH NAME
3ovrestore \- restores a backup file into an OpenVista instance3ovrestore \- restores a backup file into an OpenVista instance
4.SH SYNOPSIS4.SH SYNOPSIS
@@ -28,12 +28,22 @@
28for each process currently using the database before attempting to acquire28for each process currently using the database before attempting to acquire
29exclusive access to the database.29exclusive access to the database.
30.PP30.PP
31Routines are compiled after the routines are restored. The mumps.gld global31If the backup file contains an
32directory file is restored from the backup file, but the paths to database32.I env
33files and journal files are updated to reflect the name of the target instance. 33configuration file, it is checked for validity and restored. Routines are
34The database file is also restored from the backup file; the path to the34restored from the backup file, then compiled. The
35journal file is updated when journaling is re-enabled at the end of the restore35.I mumps.gld
36process.36global directory file is restored from the backup file, and the paths to
37database files and journal files are updated to reflect the name of the target
38instance. If the
39.I env
40file sets $gtmgbldir to point to a different
41.I mumps.gld
42file, the foreign global directory file is checked to make sure it exists, but
43no attempt is made to update the paths in the foreign global directory file.
44The database file is also restored from the backup file, and the embedded path
45to the journal file is updated when journaling is re-enabled at the end of the
46restore process.
37.PP47.PP
38If the 48If the
39.B -j49.B -j
4050
=== modified file 'mumps/ZCD.m'
--- mumps/ZCD.m 2009-11-24 22:57:02 +0000
+++ mumps/ZCD.m 2009-12-21 19:35:21 +0000
@@ -1,4 +1,4 @@
1ZCD ; MSC/JKT,JDS ; "Namespace" utilities for GT.M/Unix ; 17JUL20091ZCD ; MSC/JKT,JDS ; "Namespace" utilities for GT.M/Unix ; 5DEC2009
2 ;;8.0;KERNEL;**MSC**;April 21 20092 ;;8.0;KERNEL;**MSC**;April 21 2009
3 ; This routine assumes that your global directory file exists one 3 ; This routine assumes that your global directory file exists one
4 ; directory below the root of the instance, e.g., 4 ; directory below the root of the instance, e.g.,
@@ -40,12 +40,18 @@
40 Q $$ROOT()_"/"_INSTANCE40 Q $$ROOT()_"/"_INSTANCE
41 ;41 ;
42GTMPATH(INSTANCE) ; return the path to the version of GT.M this instance uses42GTMPATH(INSTANCE) ; return the path to the version of GT.M this instance uses
43 N %PIPE,%I S %PIPE="readlink",%I=$I43 N %PATH,%PIPE,%I
44 S %I=$I
45 S %PIPE="ovgetvar"
46 O %PIPE:(COMMAND="ovgetvar "_INSTANCE_" gtm_path 2> /dev/null":READONLY)::"PIPE" U %PIPE
47 R %PATH
48 C %PIPE
49 I %PATH'="" U %I Q %PATH
50 S %PIPE="readlink"
44 O %PIPE:(COMMAND="readlink "_$$PATH(INSTANCE)_"/gtm":READONLY)::"PIPE" U %PIPE51 O %PIPE:(COMMAND="readlink "_$$PATH(INSTANCE)_"/gtm":READONLY)::"PIPE" U %PIPE
45 N %PATH R %PATH52 R %PATH
46 U %I
47 C %PIPE53 C %PIPE
48 Q %PATH54 U %I Q %PATH
49 ;55 ;
50LIST ; return an array (Y) of OpenVista instances on this system56LIST ; return an array (Y) of OpenVista instances on this system
51 N %PIPE,%I S %PIPE="ls",%I=$I57 N %PIPE,%I S %PIPE="ls",%I=$I
@@ -59,21 +65,16 @@
59SWITCH(INSTANCE) ; switch to another OpenVista instance65SWITCH(INSTANCE) ; switch to another OpenVista instance
60 N %ZG,%ZRO D NEWZGZRO(INSTANCE) I %ZG="",%ZRO="" Q 066 N %ZG,%ZRO D NEWZGZRO(INSTANCE) I %ZG="",%ZRO="" Q 0
61 ;67 ;
62 ; FIXME: set gtm_dist="$root/$instance/gtm"
63 N %TEMPDIR S %TEMPDIR=$$MKTEMP() S $ZG=%ZG,$ZRO=%ZRO_" "_%TEMPDIR68 N %TEMPDIR S %TEMPDIR=$$MKTEMP() S $ZG=%ZG,$ZRO=%ZRO_" "_%TEMPDIR
64 N X,Y S X=INSTANCE X ^%ZOSF("UPPERCASE") S $ZPROMPT=Y_">"69 N X,Y S X=INSTANCE X ^%ZOSF("UPPERCASE") S $ZPROMPT=Y_">"
65 ; FIXME: set GTMXC_openvista="$root/$instance/gtm/openvista.xc"
66 ; FIXME: set PATH="$PATH:$root/$instance/gtm"
67 ;70 ;
68 ; re-ZLINK routines that have been loaded in our current image71 ; re-ZLINK routines that have been loaded in our current image
69 X "Q" ; equivalent to ZGOTO so that you can recompile a routine you are using72 X "Q" ; equivalent to ZGOTO so that you can recompile a routine you are using
70 N %ROUTINE,%FILENAME S %ROUTINE=""73 N %ROUTINE,%FILENAME S %ROUTINE=""
71NEXT F S %ROUTINE=$VIEW("rtnnext",%ROUTINE) Q:%ROUTINE="" D74NEXT F S %ROUTINE=$VIEW("rtnnext",%ROUTINE) Q:%ROUTINE="" D
72 . Q:%ROUTINE="GTM$DMOD"75 . I "^GTM$DMOD^ZCD^MSCXUS3A^XQ1^XUP^%MSCXUCI^%ZMSCXUCI^"[("^"_%ROUTINE_"^") Q ;do not try to recompile these
73 . Q:%ROUTINE="ZCD"
74 . I "^MSCXUS3A^XQ1^XUP^%MSCXUCI^%ZMSCXUCI^"[("^"_%ROUTINE_"^") Q ;switch UCI option
75 . ;76 . ;
76 . ; The only % routines that we ship start with %Z other % routines are allocated to the 77 . ; The only % routines that we ship start with %Z; other % routines are allocated to the
77 . ; vendor (GTM) and do not need to be recompiled (and may only have object code)78 . ; vendor (GTM) and do not need to be recompiled (and may only have object code)
78 . Q:$E(%ROUTINE)="%"&($E(%ROUTINE,2)'="Z")79 . Q:$E(%ROUTINE)="%"&($E(%ROUTINE,2)'="Z")
79 . ;80 . ;
@@ -106,7 +107,19 @@
106SWITCHENV(INSTANCE) ; private entry point107SWITCHENV(INSTANCE) ; private entry point
107 ; set new $ZG and $ZRO by parsing env file in target instance108 ; set new $ZG and $ZRO by parsing env file in target instance
108 ;109 ;
109 ; FIXME: implement this110 N %PIPE,%I
111 S %I=$I
112 S %PIPE="ovgetvar_gtmgbldir"
113 O %PIPE:(COMMAND="ovgetvar "_INSTANCE_" gtmgbldir 2> /dev/null":READONLY)::"PIPE" U %PIPE
114 R %ZG
115 C %PIPE
116 S %PIPE="ovgetvar_gtmroutines"
117 O %PIPE:(COMMAND="ovgetvar "_INSTANCE_" gtmroutines 2> /dev/null":READONLY)::"PIPE" U %PIPE
118 R %ZRO
119 C %PIPE
120 U %I
121 ;
122 ; FIXME: check that %ZG actually exists and that all pieces of %ZRO exist
110 Q123 Q
111 ;124 ;
112SWITCHCAT(INSTANCE) ; private entry point125SWITCHCAT(INSTANCE) ; private entry point
113126
=== modified file 'mumps/ZTMGRSET.m'
--- mumps/ZTMGRSET.m 2009-08-31 18:49:27 +0000
+++ mumps/ZTMGRSET.m 2009-12-21 19:35:21 +0000
@@ -1,4 +1,4 @@
1ZTMGRSET ;SF/RWF,PUG/TOAD,MSC/JDA/JDS/JKT - SET UP THE MGR ACCOUNT FOR THE SYSTEM ;11JUN20091ZTMGRSET ;SF/RWF,PUG/TOAD,MSC/JDA/JDS/JKT - SET UP THE MGR ACCOUNT FOR THE SYSTEM ;21DEC2009
2 ;;8.0;KERNEL;**34,36,69,94,121,127,136,191,275,MSC**;JUL 10, 1995;2 ;;8.0;KERNEL;**34,36,69,94,121,127,136,191,275,MSC**;JUL 10, 1995;
3 ;3 ;
4 N %D,%S,I,OSMAX,U,X,X1,X2,Y,Z1,Z2,ZTOS,ZTMODE,SCR4 N %D,%S,I,OSMAX,U,X,X1,X2,Y,Z1,Z2,ZTOS,ZTMODE,SCR
@@ -160,11 +160,13 @@
160COPY(FROM,TO) ;160COPY(FROM,TO) ;
161 I ZTOS'=7,ZTOS'=8 X "ZL @FROM ZS @TO" Q161 I ZTOS'=7,ZTOS'=8 X "ZL @FROM ZS @TO" Q
162 ;For GT.M below162 ;For GT.M below
163 N PATH,COPY S PATH=$$R163 S TO=$TR(TO,"%","_")
164 D SILENT^%RSEL(FROM) S FROM=PATH_FROM_".m"164 N PATH,SRC,DST,COPY
165 S TO=PATH_$TR(TO,"%","_")_".m"165 S PATH=$$R
166 N %ZR D SILENT^%RSEL(FROM) S SRC=%ZR(FROM)_FROM_".m"
167 S DST=PATH_TO_".m"
166 S COPY=$S(ZTOS=7:"COPY",1:"cp")168 S COPY=$S(ZTOS=7:"COPY",1:"cp")
167 ZSYSTEM COPY_" "_FROM_" "_TO169 ZSYSTEM COPY_" "_SRC_" "_DST
168 ZLINK TO170 ZLINK TO
169 Q171 Q
170 ;172 ;
171173
=== modified file 'packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/changelog'
--- packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/changelog 2009-11-22 08:04:35 +0000
+++ packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/changelog 2009-12-21 19:35:21 +0000
@@ -1,3 +1,12 @@
1openvista-gtm-integration (0.8.6-0ubuntu2~msc3~jaunty1) jaunty; urgency=low
2
3 * Update utils to honor env config file if it exists (Closes: #336166)
4 * Add man pages for new ovcheckperms and ovgetvar utilities
5 * Add config file templates in /usr/share/openvista
6 * Remove executable bit on munin plugin configuration file
7
8 -- Jonathan Tai <jon.tai@medsphere.com> Thu, 17 Dec 2009 10:11:25 -0800
9
1openvista-gtm-integration (0.8.6-0ubuntu2~msc2~jaunty1) jaunty; urgency=low10openvista-gtm-integration (0.8.6-0ubuntu2~msc2~jaunty1) jaunty; urgency=low
211
3 * Re-order dependencies so preferred packages come first.12 * Re-order dependencies so preferred packages come first.
413
=== modified file 'packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/openvista-utils.dirs'
--- packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/openvista-utils.dirs 2009-10-20 02:23:22 +0000
+++ packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/openvista-utils.dirs 2009-12-21 19:35:21 +0000
@@ -4,6 +4,7 @@
4sbin4sbin
5usr/bin5usr/bin
6usr/lib/openvista6usr/lib/openvista
7usr/share/openvista
7usr/sbin8usr/sbin
8usr/share/doc/openvista-utils9usr/share/doc/openvista-utils
9var/www/webdav10var/www/webdav
1011
=== modified file 'packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/openvista-utils.manpages'
--- packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/openvista-utils.manpages 2009-10-20 02:23:22 +0000
+++ packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/openvista-utils.manpages 2009-12-21 19:35:21 +0000
@@ -10,3 +10,5 @@
10docs/man1/ovpurgejournals.110docs/man1/ovpurgejournals.1
11docs/man1/ovswitchjournals.111docs/man1/ovswitchjournals.1
12docs/man1/ovimport.112docs/man1/ovimport.1
13docs/man1/ovcheckperms.1
14docs/man1/ovgetvar.1
1315
=== modified file 'packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/rules'
--- packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/rules 2009-10-21 23:27:51 +0000
+++ packages/deb/Ubuntu/9.04/openvista-gtm-integration/debian/rules 2009-12-21 19:35:21 +0000
@@ -86,7 +86,7 @@
86 dh_prep -i 86 dh_prep -i
87 dh_installdirs -i87 dh_installdirs -i
8888
89 install scripts/etc/munin/plugin-conf.d/openvista debian/openvista-munin-plugins/etc/munin/plugin-conf.d/89 install -m 644 scripts/etc/munin/plugin-conf.d/openvista debian/openvista-munin-plugins/etc/munin/plugin-conf.d/
90 install scripts/usr/share/munin/plugins/openvista_databases_ debian/openvista-munin-plugins/usr/share/munin/plugins/90 install scripts/usr/share/munin/plugins/openvista_databases_ debian/openvista-munin-plugins/usr/share/munin/plugins/
91 install scripts/usr/share/munin/plugins/openvista_locks_ debian/openvista-munin-plugins/usr/share/munin/plugins/91 install scripts/usr/share/munin/plugins/openvista_locks_ debian/openvista-munin-plugins/usr/share/munin/plugins/
92 install scripts/usr/share/munin/plugins/openvista_processes_ debian/openvista-munin-plugins/usr/share/munin/plugins/92 install scripts/usr/share/munin/plugins/openvista_processes_ debian/openvista-munin-plugins/usr/share/munin/plugins/
@@ -110,17 +110,17 @@
110110
111 install -m 644 scripts/usr/lib/openvista/functions debian/openvista-utils/usr/lib/openvista/111 install -m 644 scripts/usr/lib/openvista/functions debian/openvista-utils/usr/lib/openvista/
112112
113 install scripts/usr/sbin/ovinstanceadd debian/openvista-utils/usr/sbin/113 for config in scripts/usr/share/openvista/*; do \
114 install scripts/usr/sbin/ovinstancedel debian/openvista-utils/usr/sbin/114 install -m 644 $$config debian/openvista-utils/usr/share/openvista/ ;\
115 install scripts/usr/sbin/ovrestore debian/openvista-utils/usr/sbin/115 done
116116
117 install scripts/usr/bin/openvista debian/openvista-utils/usr/bin/117 for script in scripts/usr/sbin/*; do \
118 install scripts/usr/bin/ovtied debian/openvista-utils/usr/bin/118 install $$script debian/openvista-utils/usr/sbin/ ;\
119 install scripts/usr/bin/ovcc debian/openvista-utils/usr/bin/119 done
120 install scripts/usr/bin/ovbackup debian/openvista-utils/usr/bin/120
121 install scripts/usr/bin/ovpurgejournals debian/openvista-utils/usr/bin/121 for script in scripts/usr/bin/*; do \
122 install scripts/usr/bin/ovswitchjournals debian/openvista-utils/usr/bin/122 install $$script debian/openvista-utils/usr/bin/ ;\
123 install scripts/usr/bin/ovimport debian/openvista-utils/usr/bin/123 done
124124
125 install scripts/etc/init.d/openvista-databases debian/openvista-utils.openvista-databases.init125 install scripts/etc/init.d/openvista-databases debian/openvista-utils.openvista-databases.init
126 install scripts/etc/init.d/openvista debian/openvista-utils.openvista.init126 install scripts/etc/init.d/openvista debian/openvista-utils.openvista.init
127127
=== modified file 'packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/changelog'
--- packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/changelog 2009-11-22 08:04:35 +0000
+++ packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/changelog 2009-12-21 19:35:21 +0000
@@ -1,3 +1,12 @@
1openvista-gtm-integration (0.8.6-0ubuntu2~msc3~karmic1) karmic; urgency=low
2
3 * Update utils to honor env config file if it exists (Closes: #336166)
4 * Add man pages for new ovcheckperms and ovgetvar utilities
5 * Add config file templates in /usr/share/openvista
6 * Remove executable bit on munin plugin configuration file
7
8 -- Jonathan Tai <jon.tai@medsphere.com> Thu, 17 Dec 2009 10:11:25 -0800
9
1openvista-gtm-integration (0.8.6-0ubuntu2~msc2~karmic1) karmic; urgency=low10openvista-gtm-integration (0.8.6-0ubuntu2~msc2~karmic1) karmic; urgency=low
211
3 * Re-order dependencies so preferred packages come first.12 * Re-order dependencies so preferred packages come first.
413
=== modified file 'packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/openvista-utils.dirs'
--- packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/openvista-utils.dirs 2009-11-19 21:19:51 +0000
+++ packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/openvista-utils.dirs 2009-12-21 19:35:21 +0000
@@ -4,6 +4,7 @@
4sbin4sbin
5usr/bin5usr/bin
6usr/lib/openvista6usr/lib/openvista
7usr/share/openvista
7usr/sbin8usr/sbin
8usr/share/doc/openvista-utils9usr/share/doc/openvista-utils
9var/www/webdav10var/www/webdav
1011
=== modified file 'packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/openvista-utils.manpages'
--- packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/openvista-utils.manpages 2009-11-19 21:19:51 +0000
+++ packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/openvista-utils.manpages 2009-12-21 19:35:21 +0000
@@ -10,3 +10,5 @@
10docs/man1/ovpurgejournals.110docs/man1/ovpurgejournals.1
11docs/man1/ovswitchjournals.111docs/man1/ovswitchjournals.1
12docs/man1/ovimport.112docs/man1/ovimport.1
13docs/man1/ovcheckperms.1
14docs/man1/ovgetvar.1
1315
=== modified file 'packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/rules'
--- packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/rules 2009-11-19 21:19:51 +0000
+++ packages/deb/Ubuntu/9.10/openvista-gtm-integration/debian/rules 2009-12-21 19:35:21 +0000
@@ -86,7 +86,7 @@
86 dh_prep -i 86 dh_prep -i
87 dh_installdirs -i87 dh_installdirs -i
8888
89 install scripts/etc/munin/plugin-conf.d/openvista debian/openvista-munin-plugins/etc/munin/plugin-conf.d/89 install -m 644 scripts/etc/munin/plugin-conf.d/openvista debian/openvista-munin-plugins/etc/munin/plugin-conf.d/
90 install scripts/usr/share/munin/plugins/openvista_databases_ debian/openvista-munin-plugins/usr/share/munin/plugins/90 install scripts/usr/share/munin/plugins/openvista_databases_ debian/openvista-munin-plugins/usr/share/munin/plugins/
91 install scripts/usr/share/munin/plugins/openvista_locks_ debian/openvista-munin-plugins/usr/share/munin/plugins/91 install scripts/usr/share/munin/plugins/openvista_locks_ debian/openvista-munin-plugins/usr/share/munin/plugins/
92 install scripts/usr/share/munin/plugins/openvista_processes_ debian/openvista-munin-plugins/usr/share/munin/plugins/92 install scripts/usr/share/munin/plugins/openvista_processes_ debian/openvista-munin-plugins/usr/share/munin/plugins/
@@ -110,17 +110,17 @@
110110
111 install -m 644 scripts/usr/lib/openvista/functions debian/openvista-utils/usr/lib/openvista/111 install -m 644 scripts/usr/lib/openvista/functions debian/openvista-utils/usr/lib/openvista/
112112
113 install scripts/usr/sbin/ovinstanceadd debian/openvista-utils/usr/sbin/113 for config in scripts/usr/share/openvista/*; do \
114 install scripts/usr/sbin/ovinstancedel debian/openvista-utils/usr/sbin/114 install -m 644 $$config debian/openvista-utils/usr/share/openvista/ ;\
115 install scripts/usr/sbin/ovrestore debian/openvista-utils/usr/sbin/115 done
116116
117 install scripts/usr/bin/openvista debian/openvista-utils/usr/bin/117 for script in scripts/usr/sbin/*; do \
118 install scripts/usr/bin/ovtied debian/openvista-utils/usr/bin/118 install $$script debian/openvista-utils/usr/sbin/ ;\
119 install scripts/usr/bin/ovcc debian/openvista-utils/usr/bin/119 done
120 install scripts/usr/bin/ovbackup debian/openvista-utils/usr/bin/120
121 install scripts/usr/bin/ovpurgejournals debian/openvista-utils/usr/bin/121 for script in scripts/usr/bin/*; do \
122 install scripts/usr/bin/ovswitchjournals debian/openvista-utils/usr/bin/122 install $$script debian/openvista-utils/usr/bin/ ;\
123 install scripts/usr/bin/ovimport debian/openvista-utils/usr/bin/123 done
124124
125 install scripts/etc/init.d/openvista-databases debian/openvista-utils.openvista-databases.init125 install scripts/etc/init.d/openvista-databases debian/openvista-utils.openvista-databases.init
126 install scripts/etc/init.d/openvista debian/openvista-utils.openvista.init126 install scripts/etc/init.d/openvista debian/openvista-utils.openvista.init
127127
=== modified file 'packages/rpm/CentOS/5/openvista-gtm-integration.spec'
--- packages/rpm/CentOS/5/openvista-gtm-integration.spec 2009-11-23 21:23:06 +0000
+++ packages/rpm/CentOS/5/openvista-gtm-integration.spec 2009-12-21 19:35:21 +0000
@@ -63,6 +63,11 @@
63install -d %{buildroot}/usr/lib/openvista63install -d %{buildroot}/usr/lib/openvista
64install scripts/usr/lib/openvista/functions %{buildroot}/usr/lib/openvista64install scripts/usr/lib/openvista/functions %{buildroot}/usr/lib/openvista
6565
66install -d %{buildroot}%{_datadir}/openvista
67for config in scripts/usr/share/openvista/*; do
68 install -m 644 $config %{buildroot}%{_datadir}/openvista/
69done
70
66install -d %{buildroot}%{_sbindir}/71install -d %{buildroot}%{_sbindir}/
67for script in scripts/usr/sbin/*; do72for script in scripts/usr/sbin/*; do
68 install $script %{buildroot}%{_sbindir}/73 install $script %{buildroot}%{_sbindir}/
@@ -301,7 +306,7 @@
301306
302307
303%package -n openvista-utils308%package -n openvista-utils
304Release: 1309Release: 2
305Summary: Utilities for configuring and managing OpenVista310Summary: Utilities for configuring and managing OpenVista
306Group: Applications/System311Group: Applications/System
307312
@@ -335,6 +340,7 @@
335%doc COPYING.AGPL340%doc COPYING.AGPL
336%doc NEWS341%doc NEWS
337/usr/lib/openvista/functions342/usr/lib/openvista/functions
343%{_datadir}/openvista/*
338%{_sbindir}/*344%{_sbindir}/*
339%{_bindir}/*345%{_bindir}/*
340%{_mandir}/man8/*346%{_mandir}/man8/*
341347
=== modified file 'scripts/etc/bash_completion.d/openvista'
--- scripts/etc/bash_completion.d/openvista 2009-12-01 22:03:11 +0000
+++ scripts/etc/bash_completion.d/openvista 2009-12-21 19:35:21 +0000
@@ -19,14 +19,8 @@
19# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.19# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.
2020
2121
22_ovinstances()22# common functions
23{23. /usr/lib/openvista/functions
24 for instance in `ls /opt/openvista 2> /dev/null`; do
25 if [ -L "/opt/openvista/$instance/gtm" ]; then
26 echo $instance
27 fi
28 done
29}
3024
31_ov()25_ov()
32{26{
@@ -64,7 +58,7 @@
64 ;;58 ;;
65 *)59 *)
66 if [ $allowed_nonopt_words -eq 0 ]; then60 if [ $allowed_nonopt_words -eq 0 ]; then
67 COMPREPLY=( $(compgen -W "$(_ovinstances)" -- $cur) )61 COMPREPLY=( $(compgen -W "$(list_openvista_instances)" -- $cur) )
68 else62 else
69 _filedir63 _filedir
70 fi64 fi
@@ -135,10 +129,10 @@
135129
136complete -F _ovinstanceadd ovinstanceadd130complete -F _ovinstanceadd ovinstanceadd
137131
138# ovimport [-h] [-V] [-q] [-f] [-c imported|all|none] [-r] ROUTINES [-g] GLOBALS INSTANCE_NAME132# ovimport [-h] [-V] [-q] [-f] [-t target] [-c imported|all|none] [-r] ROUTINES [-g] GLOBALS INSTANCE_NAME
139_ovimport()133_ovimport()
140{134{
141 opts='-h -V -q -f -c -r -g'135 opts='-h -V -q -f -t -c -r -g'
142 allowed_nonopt_words=1136 allowed_nonopt_words=1
143137
144 COMPREPLY=()138 COMPREPLY=()
@@ -158,7 +152,7 @@
158 # afterward; use a hack to exit on the next iteration of152 # afterward; use a hack to exit on the next iteration of
159 # the loop153 # the loop
160 allowed_nonopt_words=0154 allowed_nonopt_words=0
161 elif [ x"${COMP_WORDS[i]}" = x"-c" ] || [ x"${COMP_WORDS[i]}" = x"-r" ] || [ x"${COMP_WORDS[i]}" = x"-g" ]; then155 elif [ x"${COMP_WORDS[i]}" = x"-t" ] || [ x"${COMP_WORDS[i]}" = x"-c" ] || [ x"${COMP_WORDS[i]}" = x"-r" ] || [ x"${COMP_WORDS[i]}" = x"-g" ]; then
162 allowed_nonopt_words=`expr $allowed_nonopt_words + 1`156 allowed_nonopt_words=`expr $allowed_nonopt_words + 1`
163 fi157 fi
164 ;;158 ;;
@@ -178,7 +172,11 @@
178 ;;172 ;;
179 *)173 *)
180 if [ $allowed_nonopt_words -eq 0 ]; then174 if [ $allowed_nonopt_words -eq 0 ]; then
181 COMPREPLY=( $(compgen -W "$(_ovinstances)" -- $cur) )175 COMPREPLY=( $(compgen -W "$(list_openvista_instances)" -- $cur) )
176 elif [ x"$prev" = x"-t" ]; then
177 _filedir -d
178 elif [ x"$prev" = x"-c" ]; then
179 COMPREPLY=( $(compgen -W "imported all none" -- $cur) )
182 elif [ x"$prev" = x"-r" ] || [ x"$prev" = x"-g" ]; then180 elif [ x"$prev" = x"-r" ] || [ x"$prev" = x"-g" ]; then
183 _filedir181 _filedir
184 fi182 fi
@@ -188,3 +186,52 @@
188186
189complete -F _ovimport $filenames ovimport187complete -F _ovimport $filenames ovimport
190188
189# ovgetvar [-h] [-V] INSTANCE_NAME gtm_dist|gtm_path|gtmroutines|gtmgbldir
190_ovgetvar()
191{
192 opts='-h -V'
193 allowed_nonopt_words=2
194
195 COMPREPLY=()
196
197 for i in `seq $COMP_CWORD`; do
198 # we've run out of the allowed number of non-option arguments; perform
199 # no further completion
200 if [ $allowed_nonopt_words -eq 0 ]; then
201 return
202 fi
203
204 case ${COMP_WORDS[i]} in
205 -*)
206 # if one of the arguments so far is -h or -V, perform no further completion
207 if [ x"${COMP_WORDS[i]}" = x"-h" ] || [ x"${COMP_WORDS[i]}" = x"-V" ]; then
208 # if we just return here, -h won't complete the space
209 # afterward; use a hack to exit on the next iteration of
210 # the loop
211 allowed_nonopt_words=0
212 fi
213 ;;
214
215 *)
216 allowed_nonopt_words=`expr $allowed_nonopt_words - 1`
217 ;;
218 esac
219 done
220
221 cur=${COMP_WORDS[COMP_CWORD]}
222
223 case $cur in
224 -*)
225 COMPREPLY=( $(compgen -W "$opts" -- $cur) )
226 ;;
227 *)
228 if [ $allowed_nonopt_words -eq 0 ]; then
229 COMPREPLY=( $(compgen -W "gtm_dist gtm_path gtmroutines gtmgbldir" -- $cur) )
230 else
231 COMPREPLY=( $(compgen -W "$(list_openvista_instances)" -- $cur) )
232 fi
233 ;;
234 esac
235}
236
237complete -F _ovgetvar ovgetvar
191238
=== modified file 'scripts/etc/cron.daily/openvista'
--- scripts/etc/cron.daily/openvista 2009-12-01 22:02:20 +0000
+++ scripts/etc/cron.daily/openvista 2009-12-21 19:35:21 +0000
@@ -34,11 +34,11 @@
34# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.34# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.
3535
3636
37root="/opt/openvista"37# common functions
38user="openvista"38. /usr/lib/openvista/functions
3939
40for instance in `ls $root`; do40for instance in `list_openvista_instances`; do
41 [ -L "$root/$instance/gtm" ] || continue41 set_gtm_env "$instance"
4242
43 # the default is "yes" unless the etc/backups.conf file exists and it has43 # the default is "yes" unless the etc/backups.conf file exists and it has
44 # backup_daily set to "no"... in other words, an instance has to "opt out"44 # backup_daily set to "no"... in other words, an instance has to "opt out"
4545
=== modified file 'scripts/etc/init.d/openvista'
--- scripts/etc/init.d/openvista 2009-08-31 19:42:33 +0000
+++ scripts/etc/init.d/openvista 2009-12-21 19:35:21 +0000
@@ -62,9 +62,6 @@
62[ -f /lib/lsb/init-functions ] && . /lib/lsb/init-functions62[ -f /lib/lsb/init-functions ] && . /lib/lsb/init-functions
63. /usr/lib/openvista/functions63. /usr/lib/openvista/functions
6464
65root="/opt/openvista"
66user="openvista"
67
68run_hook()65run_hook()
69{66{
70 set_gtm_env "$1" || return 167 set_gtm_env "$1" || return 1
@@ -124,10 +121,8 @@
124 elif function_exists "log_daemon_msg"; then121 elif function_exists "log_daemon_msg"; then
125 log_daemon_msg "Running startup hooks for OpenVista databases"122 log_daemon_msg "Running startup hooks for OpenVista databases"
126 fi123 fi
127
128 for instance in `ls $root`; do
129 [ -L "$root/$instance/gtm" ] || continue
130124
125 for instance in `list_openvista_instances`; do
131 if function_exists "action"; then126 if function_exists "action"; then
132 action $" Running startup hooks for $instance: " run_hook "$instance" ZSTART127 action $" Running startup hooks for $instance: " run_hook "$instance" ZSTART
133 elif function_exists "log_daemon_msg"; then128 elif function_exists "log_daemon_msg"; then
@@ -161,9 +156,7 @@
161 log_daemon_msg "Running shutdown hooks for OpenVista databases"156 log_daemon_msg "Running shutdown hooks for OpenVista databases"
162 fi157 fi
163158
164 for instance in `ls $root`; do159 for instance in `list_openvista_instances`; do
165 [ -L "$root/$instance/gtm" ] || continue
166
167 if function_exists "action"; then160 if function_exists "action"; then
168 action $" Running shutdown hooks for $instance: " run_hook "$instance" ZSTOP161 action $" Running shutdown hooks for $instance: " run_hook "$instance" ZSTOP
169 elif function_exists "log_daemon_msg"; then162 elif function_exists "log_daemon_msg"; then
170163
=== modified file 'scripts/etc/init.d/openvista-databases'
--- scripts/etc/init.d/openvista-databases 2009-10-22 19:48:28 +0000
+++ scripts/etc/init.d/openvista-databases 2009-12-21 19:35:21 +0000
@@ -69,8 +69,6 @@
69[ -f /lib/lsb/init-functions ] && . /lib/lsb/init-functions69[ -f /lib/lsb/init-functions ] && . /lib/lsb/init-functions
70. /usr/lib/openvista/functions70. /usr/lib/openvista/functions
7171
72root="/opt/openvista"
73
74recover_backward()72recover_backward()
75{73{
76 set_gtm_env "$1" || return 174 set_gtm_env "$1" || return 1
@@ -158,7 +156,7 @@
158if [ `id -u` -ne 0 ]; then156if [ `id -u` -ne 0 ]; then
159 echo "openvista-databases: Must be run as root" >&2157 echo "openvista-databases: Must be run as root" >&2
160 exit 4 # LSB: user had insufficient privilege158 exit 4 # LSB: user had insufficient privilege
161fi 159fi
162160
163# check for for valid arguments (requires correct permissions to do; must happen after permission checks)161# check for for valid arguments (requires correct permissions to do; must happen after permission checks)
164if [ -n "$2" ]; then162if [ -n "$2" ]; then
@@ -177,9 +175,7 @@
177 log_daemon_msg "Performing backward journal recovery on OpenVista databases"175 log_daemon_msg "Performing backward journal recovery on OpenVista databases"
178 fi176 fi
179177
180 for instance in `ls $root`; do178 for instance in `list_openvista_instances`; do
181 [ -L "$root/$instance/gtm" ] || continue
182
183 if function_exists "action"; then179 if function_exists "action"; then
184 action $" Performing recovery on $instance database: " recover_backward "$instance"180 action $" Performing recovery on $instance database: " recover_backward "$instance"
185 elif function_exists "log_daemon_msg"; then181 elif function_exists "log_daemon_msg"; then
@@ -212,10 +208,8 @@
212 elif function_exists "log_daemon_msg"; then208 elif function_exists "log_daemon_msg"; then
213 log_daemon_msg "Terminating remaining mumps processes"209 log_daemon_msg "Terminating remaining mumps processes"
214 fi210 fi
215
216 for instance in `ls $root`; do
217 [ -L "$root/$instance/gtm" ] || continue
218211
212 for instance in `list_openvista_instances`; do
219 if function_exists "action"; then213 if function_exists "action"; then
220 action $" Terminating mumps processes in $instance: " terminate_processes "$instance"214 action $" Terminating mumps processes in $instance: " terminate_processes "$instance"
221 elif function_exists "log_daemon_msg"; then215 elif function_exists "log_daemon_msg"; then
222216
=== modified file 'scripts/usr/bin/ovbackup'
--- scripts/usr/bin/ovbackup 2009-10-31 06:23:59 +0000
+++ scripts/usr/bin/ovbackup 2009-12-21 19:35:21 +0000
@@ -80,7 +80,7 @@
80}80}
8181
82if [ -e "$root/$instance/etc/backups.conf" ]; then82if [ -e "$root/$instance/etc/backups.conf" ]; then
83 . "$root/$instance/etc/backups.conf" 83 . "$root/$instance/etc/backups.conf"
84fi84fi
8585
86case $num_backups in86case $num_backups in
@@ -88,7 +88,7 @@
88 # num_backups was not set, blank, 0, or not an integer; set to default of 388 # num_backups was not set, blank, 0, or not an integer; set to default of 3
89 num_backups=389 num_backups=3
90 ;;90 ;;
91esac 91esac
9292
93print_status "ovbackup" "Starting backup of $instance" "$skip_status"93print_status "ovbackup" "Starting backup of $instance" "$skip_status"
9494
@@ -98,7 +98,7 @@
98# the EXIT handler may or may not run if we're interrupted or killed depending98# the EXIT handler may or may not run if we're interrupted or killed depending
99# on the shell used (from what I've read, it does run on bash, but not on99# on the shell used (from what I've read, it does run on bash, but not on
100# dash); use $exit to exit with the correct status in both cases100# dash); use $exit to exit with the correct status in both cases
101trap '[ -z "$exit" ] && rm -rf "$tempdir"; exit ${exit:-0}' EXIT101trap 'rm -rf "$tempdir"; exit ${exit:-0}' EXIT
102102
103trap 'print_status "ovbackup" "Caught SIGINT, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=130}' INT103trap 'print_status "ovbackup" "Caught SIGINT, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=130}' INT
104trap 'print_status "ovbackup" "Caught SIGTERM, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=143}' TERM104trap 'print_status "ovbackup" "Caught SIGTERM, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=143}' TERM
@@ -109,16 +109,31 @@
109# store the version of GT.M the current instance is using in the backup file per bug404177109# store the version of GT.M the current instance is using in the backup file per bug404177
110echo -e 'W $ZVERSION\nH\n' | mumps -dir 2>&1 | grep -v '^$' | grep -v '>$' > "$tempdir/gtm_version"110echo -e 'W $ZVERSION\nH\n' | mumps -dir 2>&1 | grep -v '^$' | grep -v '>$' > "$tempdir/gtm_version"
111111
112print_status "ovbackup" "Copying configuration files" "$skip_status"
113
114install -m 2750 -d "$tempdir/etc" ||
115exit_with_error "ovbackup" "Unable to copy configuration files"
116
117# copy env file if it exists
118if [ -f "$root/$instance/etc/env" ]; then
119 cp -p "$root/$instance/etc/env" "$tempdir/etc/" ||
120 exit_with_error "ovbackup" "Unable to copy env configuration file"
121fi
122
112print_status "ovbackup" "Copying routines" "$skip_status"123print_status "ovbackup" "Copying routines" "$skip_status"
113124
114cp -a "$root/$instance/routines" "$tempdir" || 125# follow symlinks when copying (copy the routines pointed to by the symlink,
126# not the symlink itself). this allows administrators to reference routines
127# outside the OpenVista instance's routines directory and still have them
128# backed up (e.g., to share routines between OpenVista instances)
129cp -RLp "$root/$instance/routines" "$tempdir" ||
115exit_with_error "ovbackup" "Unable to copy routines"130exit_with_error "ovbackup" "Unable to copy routines"
116131
117print_status "ovbackup" "Copying database files" "$skip_status"132print_status "ovbackup" "Copying database files" "$skip_status"
118133
119{134{
120 install -m 2750 -d "$tempdir/globals" &&135 install -m 2750 -d "$tempdir/globals" &&
121 cp -a "$root/$instance/globals/mumps.gld" "$tempdir/globals/"136 cp -p "$root/$instance/globals/mumps.gld" "$tempdir/globals/"
122} || exit_with_error "ovbackup" "Unable to copy mumps.gld global directory file"137} || exit_with_error "ovbackup" "Unable to copy mumps.gld global directory file"
123138
124# save this timestamp - this is the timestamp that the backup is consistent to.139# save this timestamp - this is the timestamp that the backup is consistent to.
@@ -165,7 +180,7 @@
165#180#
166# FIXME: if the routines did change, we should probably try again instead of181# FIXME: if the routines did change, we should probably try again instead of
167# just aborting - rsync the routines, then re-run the database backup182# just aborting - rsync the routines, then re-run the database backup
168output=`rsync -rli --delete --dry-run "$root/$instance/routines/" "$tempdir/routines/"`183output=`rsync -rLi --delete --dry-run "$root/$instance/routines/" "$tempdir/routines/"`
169[ -z "$output" ] || exit_with_error "ovbackup" "Routines changed during backup"184[ -z "$output" ] || exit_with_error "ovbackup" "Routines changed during backup"
170185
171# if we get here, that means that the routines haven't changed, and either the186# if we get here, that means that the routines haven't changed, and either the
@@ -185,7 +200,7 @@
185200
186(201(
187 umask 007202 umask 007
188 tar -c --remove-files `choose_bzip2` -f "$tempdir/${instance}-$timestamp.tar.bz2" -C "$tempdir" gtm_version routines globals203 tar -c --remove-files `choose_bzip2` -f "$tempdir/${instance}-$timestamp.tar.bz2" -C "$tempdir" gtm_version etc routines globals
189) || exit_with_error "ovbackup" "Unable to compress temporary backup directory"204) || exit_with_error "ovbackup" "Unable to compress temporary backup directory"
190205
191# since redirection is not safe (it follows symlinks), create the file in the206# since redirection is not safe (it follows symlinks), create the file in the
192207
=== modified file 'scripts/usr/bin/ovcheckperms'
--- scripts/usr/bin/ovcheckperms 2009-12-01 23:05:48 +0000
+++ scripts/usr/bin/ovcheckperms 2009-12-21 19:35:21 +0000
@@ -79,7 +79,7 @@
79fi79fi
8080
81if [ -z "$apache_user" ]; then81if [ -z "$apache_user" ]; then
82 echo "ovinstanceadd: apache user not found in /etc/passwd" >&282 echo "ovcheckperms: apache user not found in /etc/passwd" >&2
83 exit 283 exit 2
84fi84fi
8585
@@ -114,6 +114,10 @@
114check_perms "$root/$instance/routines" "drwxrws--- root openvista"114check_perms "$root/$instance/routines" "drwxrws--- root openvista"
115check_perms "$root/$instance/tmp" "drwxrws--- root openvista"115check_perms "$root/$instance/tmp" "drwxrws--- root openvista"
116116
117if [ -f "$root/$instance/etc/env" ]; then
118 check_perms "$root/$instance/etc/env" "-rw-r----- root openvista"
119fi
120
117count=`find "$root/$instance/journals" -type f -name '*.mjl*' \! \( -perm '0666' -a -group openvista \) | wc -l`121count=`find "$root/$instance/journals" -type f -name '*.mjl*' \! \( -perm '0666' -a -group openvista \) | wc -l`
118if [ "$count" -ne 0 ]; then122if [ "$count" -ne 0 ]; then
119 logger -p user.info -t "ovcheckperms[$$]" -- "$instance: $count journals found with incorrect permissions and/or ownership, should be -rw-rw-rw- and group openvista"123 logger -p user.info -t "ovcheckperms[$$]" -- "$instance: $count journals found with incorrect permissions and/or ownership, should be -rw-rw-rw- and group openvista"
120124
=== added file 'scripts/usr/bin/ovgetvar'
--- scripts/usr/bin/ovgetvar 1970-01-01 00:00:00 +0000
+++ scripts/usr/bin/ovgetvar 2009-12-21 19:35:21 +0000
@@ -0,0 +1,104 @@
1#!/bin/bash
2
3# This script prints the effective values of $gtm_dist, $gtmroutines, and
4# $gtmgbldir for the specified OpenVista instance.
5
6
7# Copyright (C) 2009 Medsphere Systems Corporation
8#
9# This program is free software; you can redistribute it and/or modify it solely
10# under the terms of the GNU Affero General Public License version 3 as published
11# by the Free Software Foundation.
12#
13# This program is distributed in the hope that it will be useful, but WITHOUT
14# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
16# for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses>.
20#
21# You can contact Medsphere Systems Corporation headquarters at 1917 Palomar
22# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.
23
24
25# common functions
26. /usr/lib/openvista/functions
27
28# parse arguments
29while getopts hV option; do
30 case $option in
31 h)
32 cat <<EOF
33Usage: ovgetvar INSTANCE_NAME gtm_dist|gtm_path|gtmroutines|gtmgbldir
34 or ovgetvar -h
35 or ovgetvar -V
36
37 -h display this help text and exit
38 -V display version information and exit
39EOF
40 exit 0
41 ;;
42 V)
43 cat <<EOF
44ovgetvar 0.8.6
45Copyright (C) 2009 Medsphere Systems Corporation
46
47ovgetvar is powered by Medsphere and part of a suite of open source
48utilities licensed under the AGPL, available at http://medsphere.org.
49EOF
50 exit 0
51 ;;
52 esac
53done
54shift `expr $OPTIND - 1`
55
56# check command syntax
57if [ -z "$1" ]; then
58 echo "ovgetvar: missing OpenVista instance name" >&2
59 echo "Try 'ovgetvar -h' for more information" >&2
60 exit 2
61fi
62
63# check permissions
64in_groups || {
65 echo "ovgetvar: permission denied" >&2
66 exit 1
67}
68
69# check for for valid arguments (requires correct permissions to do; must happen after permission checks)
70set_gtm_env "$1" || {
71 echo "ovgetvar: $instance: Not an OpenVista instance" >&2
72 exit 3
73}
74
75if [ -z "$2" ]; then
76 echo "ovgetvar: missing key" >&2
77 echo "Try 'ovgetvar -h' for more information" >&2
78 exit 2
79fi
80
81case $2 in
82 gtm_dist)
83 echo "$gtm_dist"
84 ;;
85 gtm_path)
86 if [ -L "$gtm_dist" ]; then
87 readlink "$gtm_dist"
88 else
89 echo "$gtm_dist"
90 fi
91 ;;
92 gtmroutines)
93 echo "$gtmroutines"
94 ;;
95 gtmgbldir)
96 echo "$gtmgbldir"
97 ;;
98 *)
99 echo "ovgetvar: invalid key" >&2
100 echo "Try 'ovgetvar -h' for more information" >&2
101 exit 3
102 ;;
103esac
104
0105
=== modified file 'scripts/usr/bin/ovimport'
--- scripts/usr/bin/ovimport 2009-12-01 21:51:30 +0000
+++ scripts/usr/bin/ovimport 2009-12-21 19:35:21 +0000
@@ -25,16 +25,17 @@
25. /usr/lib/openvista/functions25. /usr/lib/openvista/functions
2626
27# parse arguments27# parse arguments
28while getopts hVqfc:r:g: option; do28while getopts hVqft:c:r:g: option; do
29 case $option in29 case $option in
30 h)30 h)
31 cat <<EOF31 cat <<EOF
32Usage: ovimport [-q] [-f] [-c imported|all|none] [-r ROUTINES] [-g GLOBALS] INSTANCE_NAME32Usage: ovimport [-q] [-f] [-t target] [-c imported|all|none] [-r ROUTINES] [-g GLOBALS] INSTANCE_NAME
33 or ovimport -h33 or ovimport -h
34 or ovimport -V34 or ovimport -V
3535
36 -q quiet; suppress status messages36 -q quiet; suppress status messages
37 -f force; import routines and globals even if target instance is not empty37 -f force; import routines and globals even if target instance is not empty
38 -t target; directory to import routines into (defaults to routines subdirectory of instance)
38 -c compile imported routines only (the default), all routines, or no routines39 -c compile imported routines only (the default), all routines, or no routines
39 -r path to routine export file, archive, or directory40 -r path to routine export file, archive, or directory
40 -g path to global export file or archive41 -g path to global export file or archive
@@ -59,6 +60,9 @@
59 f)60 f)
60 force=true61 force=true
61 ;;62 ;;
63 t)
64 target=$OPTARG
65 ;;
62 c)66 c)
63 compile=$OPTARG67 compile=$OPTARG
64 ;;68 ;;
@@ -96,6 +100,15 @@
96 exit 3100 exit 3
97}101}
98102
103: ${target:="$root/$instance/routines"}
104if [ ! -d "$target" ]; then
105 echo "ovimport: $target: No such directory" >&2
106 exit 3
107fi
108
109# make sure target ends in a slash
110target=`echo "$target" | sed 's;/$;;'`/
111
99if [ -z "$routines" ] && [ -z "$globals" ]; then112if [ -z "$routines" ] && [ -z "$globals" ]; then
100 echo "ovimport: No routines or globals specified; please use -r ROUTINES, -g GLOBALS, or both" >&2113 echo "ovimport: No routines or globals specified; please use -r ROUTINES, -g GLOBALS, or both" >&2
101 exit 3114 exit 3
@@ -103,14 +116,14 @@
103116
104if [ "0x0000000000000001" != `dse dump -fileheader 2>&1 | grep -F 'Current transaction' | awk '{ print $3 }'` ]; then117if [ "0x0000000000000001" != `dse dump -fileheader 2>&1 | grep -F 'Current transaction' | awk '{ print $3 }'` ]; then
105 $force || {118 $force || {
106 echo "ovimport: $instance: OpenVista instance is not new; use -f to force"119 echo "ovimport: $instance: OpenVista instance is not new; use -f to force" >&2
107 exit 1120 exit 1
108 }121 }
109fi122fi
110123
111if [ -n "`find \"$root/$instance/routines/\" -type f -name '*.m' -print -quit`" ]; then124if [ -n "`find \"$root/$instance/routines/\" -type f -name '*.m' -print -quit`" ]; then
112 $force || {125 $force || {
113 echo "ovimport: $instance: OpenVista instance is not new; use -f to force"126 echo "ovimport: $instance: OpenVista instance is not new; use -f to force" >&2
114 exit 1127 exit 1
115 }128 }
116fi129fi
@@ -121,7 +134,7 @@
121# the EXIT handler may or may not run if we're interrupted or killed depending134# the EXIT handler may or may not run if we're interrupted or killed depending
122# on the shell used (from what I've read, it does run on bash, but not on135# on the shell used (from what I've read, it does run on bash, but not on
123# dash); use $exit to exit with the correct status in both cases136# dash); use $exit to exit with the correct status in both cases
124trap '[ -z "$exit" ] && rm -rf "$tempdir"; exit ${exit:-0}' EXIT137trap 'rm -rf "$tempdir"; exit ${exit:-0}' EXIT
125138
126trap 'print_status "ovimport" "Caught SIGINT, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=130}' INT139trap 'print_status "ovimport" "Caught SIGINT, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=130}' INT
127trap 'print_status "ovimport" "Caught SIGTERM, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=143}' TERM140trap 'print_status "ovimport" "Caught SIGTERM, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=143}' TERM
@@ -194,40 +207,41 @@
194 real_routines=`cd "$dirname"; pwd`/"$basename"207 real_routines=`cd "$dirname"; pwd`/"$basename"
195208
196 # redirect output to a temporary file because we need to both log209 # redirect output to a temporary file because we need to both log
197 # the output and inspect it to determine success210 # the output and inspect it later to determine success
198 (211 (
199 umask 007212 umask 007
200 mumps -run ^%RI > "$tempdir/ovimport.ri" 2>&1 <<EOF213 echo -e 'N\n'"$real_routines"'\n'"$target"'\n' | mumps -run ^%RI 2>&1 \
201N214 | tee "$tempdir/ovimport.ri" \
202$real_routines215 | grep -v '^$' \
203$root/$instance/routines/216 | logger -p user.info -t "ovimport[$$]"
204EOF
205 )217 )
206218
207 cat "$tempdir/ovimport.ri" \219 grep '^Restored [0-9]\{1,\} lines in [0-9]\{1,\} routine' "$tempdir/ovimport.ri" > /dev/null ||
208 | grep -v '^$' \
209 | logger -p user.info -t "ovimport[$$]"
210
211 grep '^Restored [0-9]\{1,\} lines in [0-9]\{1,\} routines' "$tempdir/ovimport.ri" > /dev/null ||
212 exit_with_error "ovimport" "Unable to import routines"220 exit_with_error "ovimport" "Unable to import routines"
213221
214 awk '{ if ($0 ~ /^Restored [0-9]+ lines in [0-9]+ routines/) { capture = 0 } if (capture == 1 && NF != 0) { print $0 } if ($0 ~ /^Output directory/) { capture = 1 } }' "$tempdir/ovimport.ri" > "$tempdir/ovimport.compile"222 for routine in `awk '{ if ($0 ~ /^Restored [0-9]+ lines in [0-9]+ routine/) { capture = 0 } if (capture == 1 && NF != 0) { print $0 } if ($0 ~ /^Output directory/) { capture = 1 } }' "$tempdir/ovimport.ri"`; do
223 echo "$routine" | sed 's/^%/_/' >> "$tempdir/ovimport.compile"
224 done
215 ;;225 ;;
216 M)226 M)
217 print_status "ovimport" "Copying routines" "$skip_status"227 print_status "ovimport" "Copying routines" "$skip_status"
218228
219 (229 (
220 umask 007230 umask 007
221 rsync -rl --exclude '.*/' --include '*/' --include '*.m' --exclude '*' --out-format='%n' "$real_routines/" "$root/$instance/routines/" > "$tempdir/ovimport.compile"231 rsync -rlv --exclude '.*/' --include '*/' --include '*.m' --exclude '*' "$real_routines/" "$target" > "$tempdir/ovimport.rsync"
222 ) || exit_with_error "ovimport" "Unable to import routines"232 ) || exit_with_error "ovimport" "Unable to import routines"
223233
234 for routine in `cat "$tempdir/ovimport.rsync" | grep '\.m$'`; do
235 basename "$routine" | sed 's/\.m$//' >> "$tempdir/ovimport.compile"
236 done
237
224 # the umask is not enough to guarantee that the routines are user238 # the umask is not enough to guarantee that the routines are user
225 # and group readable and writable; if the source routines are not239 # and group readable and writable; if the source routines are not
226 # group writable, the destination routines won't be, either.240 # group writable, the destination routines won't be, either.
227 #241 #
228 # if we're not running as root, we won't be able to set the242 # if we're not running as root, we won't be able to set the
229 # permissions for files we don't own, so just do our best243 # permissions for files we don't own, so just do our best
230 chmod -R u+rw,g+rw "$root/$instance/routines/" 2> /dev/null244 chmod -R u+rw,g+rw "$target" 2> /dev/null
231 ;;245 ;;
232 esac246 esac
233247
@@ -235,11 +249,19 @@
235 all)249 all)
236 print_status "ovimport" "Compiling all routines" "$skip_status"250 print_status "ovimport" "Compiling all routines" "$skip_status"
237251
252 # FIXME: there is a possibility (if the env file doesn't match the
253 # -t target) that %RSEL will come up empty and no routines will be
254 # compiled.
255
256 # use mumps to compile all the files via auto-zlink; this will ensure that the
257 # correct version of the routine is compiled if more than one version exists
258 # in a different tier and that the object file is compiled to the right place.
238 (259 (
239 umask 007260 umask 007
240 cd "$root/$instance/objects" &&261 echo -e 'D SILENT^%RSEL("*") S R="" F S R=$O(%ZR(R)) Q:R="" ZLINK $S($E(R)="%":"_"_$E(R,2,$L(R)),1:R)\nH\n' | mumps -dir 2>&1 \
241 find "$root/$instance/routines/" -type f -name '*.m' -exec mumps {} \; 2> /dev/null262 | grep -v '^$' | grep -v '>$' \
242 ) || exit_with_error "ovimport" "Unable to compile routines"263 | logger -p user.info -t "ovimport[$$]"
264 )
243 ;;265 ;;
244 none)266 none)
245 print_status "ovimport" "Skipping routine compilation" "$skip_status"267 print_status "ovimport" "Skipping routine compilation" "$skip_status"
@@ -249,11 +271,39 @@
249271
250 (272 (
251 umask 007273 umask 007
252 cd "$root/$instance/objects" &&274 cat "$tempdir/ovimport.compile" | sort | uniq > "$tempdir/ovimport.compile.uniq"
253 for routine in `cat "$tempdir/ovimport.compile" | sed 's/\.m//g'`; do275 echo -e 'S LIST="'"$tempdir/ovimport.compile.uniq"'"\nO LIST:(readonly) U LIST F R ROUTINE Q:ROUTINE="" ZLINK ROUTINE\nC LIST U $P\nH\n' | mumps -dir 2>&1 \
254 mumps "../routines/$routine.m" 2> /dev/null276 | tee "$tempdir/ovimport.zlink" \
255 done277 | grep -v '^$' | grep -v '>$' \
256 )278 | logger -p user.info -t "ovimport[$$]"
279
280 # There are a couple of things could cause the routine compilation to fail
281 # (besides compile errors, which we should ignore).
282 #
283 # The user could have used the wrong -r argument, e.g.,
284 # /home/jon/openvistaserver-1.5.sp2-gtm instead of
285 # /home/jon/openvistaserver-1.5.sp2-gtm/routines, which would cause the
286 # routines to be imported to /opt/openvista/instance/routines/routines.
287 #
288 # The user could have specified a target directory other than
289 # /opt/openvista/instance/routines with -t but forgot to update $gtmroutines in
290 # /opt/openvista/instance/etc/env to reflect the target directory.
291 #
292 # The reverse of the previous case -- the user updated $gtmroutines in the env
293 # file but forgot to specify a target directory with -t.
294 #
295 # The env file has an invalid $gtmroutines setting.
296 grep -F '%GTM-E-ZLINKFILE' "$tempdir/ovimport.zlink" > /dev/null && exit 1 # exit subshell
297
298 exit 0
299 ) || {
300 # provide a helpful suggestion for the most common error -- "Unable to compile routines" can be a little cryptic
301 if [ "$target" = "$root/$instance/routines/" ] && [ `cat "$root/$instance/etc/env" 2> /dev/null | grep -v '^$' | grep -v '^#' | wc -l` -eq 0 ] && [ -d "$routines" ]; then
302 suggestion=" (routines in $routines should not be in subdirectories)"
303 fi
304
305 exit_with_error "ovimport" "Unable to compile routines$suggestion"
306 }
257 ;;307 ;;
258 esac308 esac
259309
@@ -289,7 +339,7 @@
289 | logger -p user.info -t "ovimport[$$]"339 | logger -p user.info -t "ovimport[$$]"
290 }340 }
291341
292 print_status "ovimport" "Loading globals using 'mupip load'" "$skip_status"342 print_status "ovimport" "Loading globals" "$skip_status"
293343
294 mupip load -format="$globals_format" "$real_globals" 2>&1 \344 mupip load -format="$globals_format" "$real_globals" 2>&1 \
295 | grep -v '^$' \345 | grep -v '^$' \
296346
=== modified file 'scripts/usr/lib/openvista/functions'
--- scripts/usr/lib/openvista/functions 2009-10-22 19:48:28 +0000
+++ scripts/usr/lib/openvista/functions 2009-12-21 19:35:21 +0000
@@ -19,9 +19,10 @@
19# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.19# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.
2020
2121
22# set environmental variables required by GT.M - takes a single argument, the22# check if an OpenVista instance exists. this is normally not called directly;
23# name of an OpenVista instance23# see list_openvista_instances or set_gtm_env. returns 0 if instance exists
24set_gtm_env()24# and passes basic sanity checks, 1 otherwise
25is_openvista_instance()
25{26{
26 # these are set for the benefit of the calling script27 # these are set for the benefit of the calling script
27 root="/opt/openvista"28 root="/opt/openvista"
@@ -35,27 +36,85 @@
35 # check for special characters in $instance36 # check for special characters in $instance
36 case $instance in37 case $instance in
37 */*|*" "*|*"("*|*")"*)38 */*|*" "*|*"("*|*")"*)
38 return 239 return 1
39 ;;40 ;;
40 esac41 esac
4142
42 # ensure the instance root directory exists43 # ensure the instance root directory exists
43 if [ ! -d "$root/$instance" ]; then44 if [ ! -d "$root/$instance" ]; then
44 return 345 return 1
45 fi46 fi
4647
47 # ensure that the directory looks like an OpenVista instance48 # ensure that the directory looks like an OpenVista instance
48 if [ ! -L "$root/$instance/gtm" ]; then49 if [ ! -f "$root/$instance/etc/env" ] && [ ! -L "$root/$instance/gtm" ]; then
49 return 450 return 1
50 fi51 fi
5152
52 gtm_dist="$root/$instance/gtm"53 return 0
53 gtmroutines="$root/$instance/objects($root/$instance/routines) $root/$instance/gtm"54}
54 gtmgbldir="$root/$instance/globals/mumps.gld"55
55 gtm_zinterrupt='I $$JOBEXAM^ZU($ZPOSITION)'56# returns a list of openvista instances
56 gtm_prompt=`echo "$instance>" | tr '[:lower:]' '[:upper:]'`57list_openvista_instances()
57 GTMXC_openvista="$root/$instance/gtm/openvista.xc"58{
58 PATH="$PATH:$root/$instance/gtm"59 is_openvista_instance "foo" # dummy call to set $root
60
61 for instance in `ls "$root" 2> /dev/null`; do
62 is_openvista_instance "$instance" || continue
63 echo $instance
64 done
65}
66
67# set environmental variables required by GT.M - takes a single argument, the
68# name of an OpenVista instance
69set_gtm_env()
70{
71 is_openvista_instance "$1" || return 1
72
73 # unset all vars to prevent contamination from the calling environment
74 gtm_dist=""
75 gtmroutines=""
76 gtmgbldir=""
77 gtm_zinterrupt=""
78 gtm_prompt=""
79 GTMXC_openvista=""
80
81 # if the env file exists, source it
82 if [ -f ${2:-"$root/$instance/etc/env"} ]; then
83 . ${2:-"$root/$instance/etc/env"}
84 fi
85
86 # set remaining variables if they have not been set already
87 #
88 # if none of these variables were dependent on each other, we could have
89 # just set them first, then sourced the env file, but since they depend on
90 # each other (e.g., gtmroutines contains gtm_dist), we need to first source
91 # the env file, then set the variables conditionally
92
93 if [ -z "$gtm_dist" ]; then
94 gtm_dist="$root/$instance/gtm"
95 fi
96
97 if [ -z "$gtmroutines" ]; then
98 gtmroutines="$root/$instance/objects($root/$instance/routines) $gtm_dist"
99 fi
100
101 if [ -z "$gtmgbldir" ]; then
102 gtmgbldir="$root/$instance/globals/mumps.gld"
103 fi
104
105 if [ -z "$gtm_zinterrupt" ]; then
106 gtm_zinterrupt='I $$JOBEXAM^ZU($ZPOSITION)'
107 fi
108
109 if [ -z "$gtm_prompt" ]; then
110 gtm_prompt=`echo "$instance>" | tr '[:lower:]' '[:upper:]'`
111 fi
112
113 if [ -z "$GTMXC_openvista" ]; then
114 GTMXC_openvista="$gtm_dist/openvista.xc"
115 fi
116
117 PATH="$PATH:$gtm_dist"
59118
60 export gtm_dist119 export gtm_dist
61 export gtmroutines120 export gtmroutines
@@ -71,6 +130,7 @@
71# check user's group membership - users need to be in the gtm group to use130# check user's group membership - users need to be in the gtm group to use
72# GT.M; users need to be in the openvista group to access files under131# GT.M; users need to be in the openvista group to access files under
73# /opt/openvista. If the user is root, pretend that root is in both groups.132# /opt/openvista. If the user is root, pretend that root is in both groups.
133# returns 0 if group membership is OK, 1 if not OK
74in_groups()134in_groups()
75{135{
76 if [ `id -u` -eq 0 ]; then136 if [ `id -u` -eq 0 ]; then
@@ -129,6 +189,7 @@
129 fi189 fi
130}190}
131191
192# check if a certain bash function has been defined
132function function_exists()193function function_exists()
133{194{
134 type "$1" 2> /dev/null | grep -q 'function'195 type "$1" 2> /dev/null | grep -q 'function'
135196
=== modified file 'scripts/usr/sbin/ovinstanceadd'
--- scripts/usr/sbin/ovinstanceadd 2009-12-01 22:25:59 +0000
+++ scripts/usr/sbin/ovinstanceadd 2009-12-21 19:35:21 +0000
@@ -184,66 +184,11 @@
184set_gtm_env "$instance" || 184set_gtm_env "$instance" ||
185exit_with_error "ovinstanceadd" "Unable to set GT.M environment"185exit_with_error "ovinstanceadd" "Unable to set GT.M environment"
186186
187(187{
188 umask 027188 install -o root -g $user -m 640 /usr/share/openvista/backups.conf "$root/$instance/etc/" &&
189 cat > "$root/$instance/etc/backups.conf" <<EOF189 install -o root -g $user -m 640 /usr/share/openvista/journals.conf "$root/$instance/etc/" &&
190# configuration file for OpenVista backup utilities190 install -o root -g $user -m 640 /usr/share/openvista/env "$root/$instance/etc/"
191# this file is sourced by bash, so any valid bash syntax is allowed191} || exit_with_error "ovinstanceadd" "Unable to create configuration files"
192
193# backup_daily: Back up this instance automatically once per day
194#
195# The /etc/cron.daily/openvista script runs once per day and backs up all
196# instances with backup_daily set to "yes" one after another to avoid excessive
197# I/O from all the instances being backed up simultaneously.
198#
199# If backup_daily is set to "yes" here, the /etc/cron.daily/openvista script
200# will back up this instance. The default is "yes".
201#
202# If you want this instance to be backed up on a custom schedule, set
203# backup_daily to "no" here and add an entry for this instance in
204# /etc/cron.d/openvista.
205#
206backup_daily=yes
207
208# num_backups: Number of backups to keep in the backups directory
209#
210# After a successful backup, if there are more than num_backups backup files in
211# the backups directory, the oldest file will be deleted until the number of
212# backup files is less than or equal to num_backups. The default is 3.
213#
214num_backups=3
215
216EOF
217) || exit_with_error "ovinstanceadd" "Unable to write backups.conf configuration file"
218
219(
220 umask 027
221 cat > "$root/$instance/etc/journals.conf" <<EOF
222# configuration file for OpenVista journaling
223# this file is sourced by bash, so any valid bash syntax is allowed
224
225# purge_daily: Purge old journals for this instance automatically once per day
226#
227# If purge_daily is set to "yes" here, the /etc/cron.daily/openvista script
228# will call ovpurgejournals on this instance. The default is "yes".
229#
230# If you want old journals for this instance to be removed on a custom
231# schedule, set purge_daily to "no" here and add an entry for this instance in
232# /etc/cron.d/openvista.
233#
234purge_daily=yes
235
236# num_journals: Number of old journals to keep in the journals directory
237#
238# After a successful backup, all inactive journals should be safe to delete.
239# However, disk space permitting, it is a good idea to keep a few old journal
240# files around in case there is a problem with the most recent backup. The
241# default is 3.
242#
243num_journals=3
244
245EOF
246) || exit_with_error "ovinstanceadd" "Unable to write journals.conf configuration file"
247192
248# create the global directory file, mumps.gld193# create the global directory file, mumps.gld
249(194(
250195
=== modified file 'scripts/usr/sbin/ovrestore'
--- scripts/usr/sbin/ovrestore 2009-12-01 03:37:46 +0000
+++ scripts/usr/sbin/ovrestore 2009-12-21 19:35:21 +0000
@@ -143,7 +143,7 @@
143# the EXIT handler may or may not run if we're interrupted or killed depending143# the EXIT handler may or may not run if we're interrupted or killed depending
144# on the shell used (from what I've read, it does run on bash, but not on144# on the shell used (from what I've read, it does run on bash, but not on
145# dash); use $exit to exit with the correct status in both cases145# dash); use $exit to exit with the correct status in both cases
146trap '[ -z "$exit" ] && rm -rf "$tempdir"; exit ${exit:-0}' EXIT146trap 'rm -rf "$tempdir"; exit ${exit:-0}' EXIT
147147
148trap 'print_status "ovrestore" "Caught SIGINT, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=130}' INT148trap 'print_status "ovrestore" "Caught SIGINT, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=130}' INT
149trap 'print_status "ovrestore" "Caught SIGTERM, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=143}' TERM149trap 'print_status "ovrestore" "Caught SIGTERM, exiting" "$skip_status"; rm -rf "$tempdir"; exit ${exit:=143}' TERM
@@ -157,6 +157,8 @@
157tar -x `choose_bzip2` -f "$backup_file" -C "$tempdir" || 157tar -x `choose_bzip2` -f "$backup_file" -C "$tempdir" ||
158exit_with_error "ovrestore" "Unable to extract contents of backup file"158exit_with_error "ovrestore" "Unable to extract contents of backup file"
159159
160print_status "ovrestore" "Checking contents of backup file" "$skip_status"
161
160[ -d "$tempdir/routines" ] || exit_with_error "ovrestore" "Backup file does not contain routines"162[ -d "$tempdir/routines" ] || exit_with_error "ovrestore" "Backup file does not contain routines"
161[ -f "$tempdir/globals/mumps.gld" ] || exit_with_error "ovrestore" "Backup file does not contain mumps.gld global directory file"163[ -f "$tempdir/globals/mumps.gld" ] || exit_with_error "ovrestore" "Backup file does not contain mumps.gld global directory file"
162[ -f "$tempdir/globals/default.dat" ] || exit_with_error "ovrestore" "Backup file does not contain default.dat database file"164[ -f "$tempdir/globals/default.dat" ] || exit_with_error "ovrestore" "Backup file does not contain default.dat database file"
@@ -170,6 +172,43 @@
170 logger -p user.info -t "ovrestore[$$]" Backup file does not contain GT.M version information172 logger -p user.info -t "ovrestore[$$]" Backup file does not contain GT.M version information
171fi173fi
172174
175if [ -f "$tempdir/etc/env" ]; then
176 # set environment variables from new env file
177 set_gtm_env "$instance" "$tempdir/etc/env"
178
179 # change any references to the destination routines directory to point to
180 # the routines directory in the backup
181 gtmroutines=`echo "$gtmroutines" | sed "s;$root/$instance/routines;$tempdir/routines;g"`
182 export gtmroutines
183
184 # check $gtmroutines syntax
185 zro=`echo -e 'W $ZRO\nH\n' | mumps -dir 2>&1 | grep -v '^$' | grep -v '>$'`
186 if echo "$zro" | grep -F '%GTM-E-ZROSYNTAX' > /dev/null; then
187 echo "$zro" | logger -p user.info -t "ovrestore[$$]"
188 exit_with_error "ovrestore" 'Backup file contains invalid env configuration file ($gtmroutines has invalid syntax or a path in $gtmroutines does not exist)'
189 fi
190
191 # if $gtmgbldir is the default value, check the one in the backup
192 if [ "$gtmgbldir" = "$root/$instance/globals/mumps.gld" ]; then
193 gtmgbldir="$tempdir/globals/mumps.gld"
194 export gtmgbldir
195 fi
196
197 # check $gtmgbldir
198 zg=`echo -e 'W ^GLOBAL\nH\n' | mumps -dir 2>&1 | grep -v '^$' | grep -v '>$'`
199 if echo "$zg" | grep -F '%GTM-E-ZGBLDIRACC' > /dev/null; then
200 echo "$zg" | logger -p user.info -t "ovrestore[$$]"
201 exit_with_error "ovrestore" 'Backup file contains invalid env configuration file (global directory file specified by $gtmgbldir does not exist)'
202 fi
203 if echo "$zg" | grep -F '%GTM-E-GDINVALID' > /dev/null; then
204 echo "$zg" | logger -p user.info -t "ovrestore[$$]"
205 exit_with_error "ovrestore" 'Backup file contains invalid env configuration file (global directory file specified by $gtmgbldir is in an unrecognized format)'
206 fi
207
208 # re-set environment variables from original env file
209 set_gtm_env "$instance"
210fi
211
173# at this point, we're committed... we're about to kill processes, lock the212# at this point, we're committed... we're about to kill processes, lock the
174# instance, overwrite files, etc.213# instance, overwrite files, etc.
175214
@@ -217,6 +256,22 @@
217# close this instance off so nobody can use it256# close this instance off so nobody can use it
218chmod 700 "$root/$instance"257chmod 700 "$root/$instance"
219258
259print_status "ovrestore" "Restoring configuration files" "$skip_status"
260
261install -o root -g $user -m 640 /usr/share/openvista/env "$root/$instance/etc/" ||
262exit_with_error "ovrestore" "Unable to overwrite existing env configuration file"
263
264if [ -f "$tempdir/etc/env" ]; then
265 {
266 chown root:"$user" "$tempdir/etc/env" &&
267 chmod 640 "$tempdir/etc/env" &&
268 mv -f "$tempdir/etc/env" "$root/$instance/etc/env"
269 } || exit_with_error "ovrestore" "Unable to restore env configuration file"
270fi
271
272# re-set environment variables from new env file (or lack of env file)
273set_gtm_env "$instance"
274
220print_status "ovrestore" "Restoring routines" "$skip_status"275print_status "ovrestore" "Restoring routines" "$skip_status"
221276
222{277{
@@ -228,12 +283,19 @@
228283
229print_status "ovrestore" "Compiling routines" "$skip_status"284print_status "ovrestore" "Compiling routines" "$skip_status"
230285
286# remove all object files first
287find "$root/$instance/objects/" -type f -name '*.o' -exec rm -f {} \; ||
288exit_with_error "ovrestore" "Unable to remove existing object files"
289
290# use mumps to compile all the files via auto-zlink; this will ensure that the
291# correct version of the routine is compiled if more than one version exists
292# in more than one tier and that the object file is compiled to the right place.
231(293(
232 umask 007294 umask 007
233 find "$root/$instance/objects/" -type f -name '*.o' -exec rm -f {} \; &&295 echo -e 'D SILENT^%RSEL("*") S R="" F S R=$O(%ZR(R)) Q:R="" ZLINK $S($E(R)="%":"_"_$E(R,2,$L(R)),1:R)\nH\n' | mumps -dir 2>&1 \
234 cd "$root/$instance/objects" &&296 | grep -v '^$' | grep -v '>$' \
235 find "$root/$instance/routines/" -type f -name '*.m' -exec mumps {} \; 2> /dev/null297 | logger -p user.info -t "ovrestore[$$]"
236) || exit_with_error "ovrestore" "Unable to compile routines"298)
237299
238# if we're not applying journals, shut off journaling on the old database so300# if we're not applying journals, shut off journaling on the old database so
239# that there's a clean break, then move the journal file out of the way301# that there's a clean break, then move the journal file out of the way
@@ -248,7 +310,7 @@
248 | grep -v '^$' \310 | grep -v '^$' \
249 | logger -p user.info -t "ovrestore[$$]"311 | logger -p user.info -t "ovrestore[$$]"
250312
251 mv -f "$root/$instance/journals/default.mjl" "$root/$instance/journals/default.mjl_`date +%Y%j%H%M%S`_ovrestore"313 mv -f "$root/$instance/journals/default.mjl" "$root/$instance/journals/default.mjl_`date +%Y%j%H%M%S`_ovrestore" 2> /dev/null
252}314}
253315
254print_status "ovrestore" "Restoring database files" "$skip_status"316print_status "ovrestore" "Restoring database files" "$skip_status"
@@ -277,7 +339,12 @@
277SHOW -SEGMENT DEFAULT339SHOW -SEGMENT DEFAULT
278QUIT340QUIT
279EOF341EOF
280) || exit_with_error "ovrestore" "Unable to update mumps.gld global directory file"342) || {
343 # delete mumps.gld as a safety measure -- it could be pointing to another database
344 rm -f "$root/$instance/globals/mumps.gld"
345
346 exit_with_error "ovrestore" "Unable to update mumps.gld global directory file"
347}
281348
282{349{
283 chown root:"$user" "$tempdir/globals/default.dat" &&350 chown root:"$user" "$tempdir/globals/default.dat" &&
@@ -286,7 +353,7 @@
286} || exit_with_error "ovrestore" "Unable to restore default.dat database file"353} || exit_with_error "ovrestore" "Unable to restore default.dat database file"
287354
288{355{
289 mv -f "$root/$instance/globals/scratch.dat" "$root/$instance/globals/scratch.dat~" && 356 mv -f "$root/$instance/globals/scratch.dat" "$root/$instance/globals/scratch.dat~" &&
290 mupip create -region=SCRATCH 2>&1 \357 mupip create -region=SCRATCH 2>&1 \
291 | grep -v '^$' \358 | grep -v '^$' \
292 | logger -p user.info -t "ovrestore[$$]"359 | logger -p user.info -t "ovrestore[$$]"
293360
=== modified file 'scripts/usr/share/munin/plugins/openvista_databases_'
--- scripts/usr/share/munin/plugins/openvista_databases_ 2009-10-21 17:48:07 +0000
+++ scripts/usr/share/munin/plugins/openvista_databases_ 2009-12-21 19:35:21 +0000
@@ -25,14 +25,9 @@
2525
26. /usr/lib/openvista/functions26. /usr/lib/openvista/functions
2727
28root="/opt/openvista"
29user="openvista"
30
31case $1 in28case $1 in
32 autoconf)29 autoconf)
33 for instance in `ls $root`; do30 for instance in `list_openvista_instances`; do
34 [ -L "$root/$instance/gtm" ] || continue
35
36 echo "yes"31 echo "yes"
37 exit 032 exit 0
38 done33 done
@@ -42,9 +37,7 @@
42 ;;37 ;;
4338
44 suggest)39 suggest)
45 for instance in `ls $root`; do40 for instance in `list_openvista_instances`; do
46 [ -L "$root/$instance/gtm" ] || continue
47
48 echo $instance41 echo $instance
49 done42 done
50 ;;43 ;;
5144
=== modified file 'scripts/usr/share/munin/plugins/openvista_locks_'
--- scripts/usr/share/munin/plugins/openvista_locks_ 2009-10-21 17:48:07 +0000
+++ scripts/usr/share/munin/plugins/openvista_locks_ 2009-12-21 19:35:21 +0000
@@ -26,14 +26,9 @@
2626
27. /usr/lib/openvista/functions27. /usr/lib/openvista/functions
2828
29root="/opt/openvista"
30user="openvista"
31
32case $1 in29case $1 in
33 autoconf)30 autoconf)
34 for instance in `ls $root`; do31 for instance in `list_openvista_instances`; do
35 [ -L "$root/$instance/gtm" ] || continue
36
37 echo "yes"32 echo "yes"
38 exit 033 exit 0
39 done34 done
@@ -43,9 +38,7 @@
43 ;;38 ;;
4439
45 suggest)40 suggest)
46 for instance in `ls $root`; do41 for instance in `list_openvista_instances`; do
47 [ -L "$root/$instance/gtm" ] || continue
48
49 echo $instance42 echo $instance
50 done43 done
51 ;;44 ;;
5245
=== modified file 'scripts/usr/share/munin/plugins/openvista_processes_'
--- scripts/usr/share/munin/plugins/openvista_processes_ 2009-10-21 17:48:07 +0000
+++ scripts/usr/share/munin/plugins/openvista_processes_ 2009-12-21 19:35:21 +0000
@@ -26,14 +26,9 @@
2626
27. /usr/lib/openvista/functions27. /usr/lib/openvista/functions
2828
29root="/opt/openvista"
30user="openvista"
31
32case $1 in29case $1 in
33 autoconf)30 autoconf)
34 for instance in `ls $root`; do31 for instance in `list_openvista_instances`; do
35 [ -L "$root/$instance/gtm" ] || continue
36
37 echo "yes"32 echo "yes"
38 exit 033 exit 0
39 done34 done
@@ -43,9 +38,7 @@
43 ;;38 ;;
4439
45 suggest)40 suggest)
46 for instance in `ls $root`; do41 for instance in `list_openvista_instances`; do
47 [ -L "$root/$instance/gtm" ] || continue
48
49 echo $instance42 echo $instance
50 done43 done
51 ;;44 ;;
5245
=== added directory 'scripts/usr/share/openvista'
=== added file 'scripts/usr/share/openvista/backups.conf'
--- scripts/usr/share/openvista/backups.conf 1970-01-01 00:00:00 +0000
+++ scripts/usr/share/openvista/backups.conf 2009-12-21 19:35:21 +0000
@@ -0,0 +1,26 @@
1# configuration file for OpenVista backup utilities
2# this file is sourced by bash, so any valid bash syntax is allowed
3
4# backup_daily: Back up this instance automatically once per day
5#
6# The /etc/cron.daily/openvista script runs once per day and backs up all
7# instances with backup_daily set to "yes" one after another to avoid excessive
8# I/O from all the instances being backed up simultaneously.
9#
10# If backup_daily is set to "yes" here, the /etc/cron.daily/openvista script
11# will back up this instance. The default is "yes".
12#
13# If you want this instance to be backed up on a custom schedule, set
14# backup_daily to "no" here and add an entry for this instance in
15# /etc/cron.d/openvista.
16#
17backup_daily=yes
18
19# num_backups: Number of backups to keep in the backups directory
20#
21# After a successful backup, if there are more than num_backups backup files in
22# the backups directory, the oldest file will be deleted until the number of
23# backup files is less than or equal to num_backups. The default is 3.
24#
25num_backups=3
26
027
=== added file 'scripts/usr/share/openvista/env'
--- scripts/usr/share/openvista/env 1970-01-01 00:00:00 +0000
+++ scripts/usr/share/openvista/env 2009-12-21 19:35:21 +0000
@@ -0,0 +1,96 @@
1# configuration file for OpenVista
2# this file is sourced by bash, so any valid bash syntax is allowed
3
4# The following environment variables are set to their defaults by set_gtm_env
5# in /usr/lib/openvista/functions if they are not set here. Leaving this file
6# completely commented out is recommended unless you need to change one of the
7# variables.
8#
9# WARNING: Use of the $root and $instance variables is recommended over
10# hard-coding paths such as /opt/openvista/production. Using variables allows
11# a backup of an OpenVista instance (e.g., production) to be restored into an
12# empty OpenVista instance with a different name (e.g., dev), since $root and
13# $instance are evaluated at run-time. Hard-coding a path to
14# /opt/openvista/production will cause the dev instance to look for its
15# routines (or worse, its globals!) in /opt/openvista/production.
16
17# Uncomment and modify these lines to set an alternate installation of GT.M
18# that this OpenVista instance should use. By default, this points to the gtm
19# symlink in the OpenVista instance's root directory. Updating the symlink is
20# the preferred way to change the version of GT.M this instance uses, so you
21# should almost always leave this commented out.
22#
23#gtm_dist="$root/$instance/gtm"
24#export gtm_dist
25
26# Uncomment and modify these lines to override GT.M's routine search path. By
27# default, GT.M is configured to look for routines in the routines subdirectory
28# in the OpenVista instance's root directory and store compiled objects in the
29# objects subdirectory.
30#
31# A common practice is to divide routines into "released routines" and
32# "patches". This can be accomplished by setting $gtmroutines as follows:
33#
34# gtmroutines="$root/$instance/objects($root/$instance/routines/patches $root/$instance/routines/routines) $root/$instance/gtm"
35#
36# Any routines in the patches directory will take precedence over the same
37# routine in the routines directory.
38#
39# Another common practice is to split routines into tiers that reflect their
40# origin, e.g.,
41#
42# gtmroutines="$root/$instance/objects($root/$instance/routines/medsphere $root/$instance/routines/vendor $root/$instance/routines/foia) $root/$instance/gtm"
43#
44# In a development environment, you may want to reference routines outside of
45# the routines directory:
46#
47# gtmroutines="$root/$instance/objects(/home/developer/routines $root/$instance/routines) $root/$instance/gtm"
48#
49# WARNING: Utilities such as ovbackup will ignore routines outside of the
50# routines directory. If you reference routines outside of the routines
51# directory, you must back them up yourself. In the development example
52# provided above, it is assumed that /home/developer/routines is managed by an
53# external revision control system.
54#
55# NOTE: If you want to reference routines outside of the routines directory,
56# but you still want to have them backed up by ovbackup, you should create a
57# symlink inside the routines directory that points to the external directory,
58# e.g.,
59#
60# gtmroutines="$root/$instance/objects($root/$instance/routines/instance-specific $root/$instance/routines/shared) $root/$instance/gtm"
61#
62# where $root/$instance/routines/shared is a symlink to a directory of routines
63# that are shared across instances. ovbackup and other utilities follow
64# symlinks, so the symlink targets will be backed up, allowing you to do a
65# restore with ovrestore and get a functional standalone system.
66#
67#gtmroutines="$root/$instance/objects($root/$instance/routines) $root/$instance/gtm"
68#export gtmroutines
69
70# Uncomment and modify these lines to set the path where GT.M looks for the
71# global directory file. By default, the global directory file is named
72# mumps.gld and resides in the globals subdirectory of the OpenVista instance's
73# root directory. Updating the default global directory file is the preferred
74# way to customize the global directory, so you should almost always leave this
75# commented out.
76#
77# WARNING: Utilities such as ovbackup will ignore alternate global directory
78# paths and back up the default mumps.gld file. If you change the path to the
79# global directory file here, you must back it up yourself.
80#
81# WARNING: Utilities such as ovrestore and /etc/init.d/openvista-databases
82# expect two database regions, DEFAULT and SCRATCH, and two physical segments
83# (database files), globals/default.dat and globals/scratch.dat. Your
84# alternate global directory file must have these regions and physical
85# segments.
86#
87# WARNING: Utilities such as the ZCD routine expect paths to physical segments
88# in the global directory file to be fully-evaluated, absolute, paths. Using
89# variables or relative paths will likely cause ZCD to malfunction, preventing
90# users from switching between OpenVista instances (or worse, it may look like
91# they have switched, but they are still accessing globals in the original
92# instance!)
93#
94#gtmgbldir="$root/$instance/globals/mumps.gld"
95#export gtmgbldir
96
097
=== added file 'scripts/usr/share/openvista/journals.conf'
--- scripts/usr/share/openvista/journals.conf 1970-01-01 00:00:00 +0000
+++ scripts/usr/share/openvista/journals.conf 2009-12-21 19:35:21 +0000
@@ -0,0 +1,23 @@
1# configuration file for OpenVista journaling
2# this file is sourced by bash, so any valid bash syntax is allowed
3
4# purge_daily: Purge old journals for this instance automatically once per day
5#
6# If purge_daily is set to "yes" here, the /etc/cron.daily/openvista script
7# will call ovpurgejournals on this instance. The default is "yes".
8#
9# If you want old journals for this instance to be removed on a custom
10# schedule, set purge_daily to "no" here and add an entry for this instance in
11# /etc/cron.d/openvista.
12#
13purge_daily=yes
14
15# num_journals: Number of old journals to keep in the journals directory
16#
17# After a successful backup, all inactive journals should be safe to delete.
18# However, disk space permitting, it is a good idea to keep a few old journal
19# files around in case there is a problem with the most recent backup. The
20# default is 3.
21#
22num_journals=3
23

Subscribers

People subscribed via source and target branches