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

Proposed by Jon Tai
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jontai/openvista-gtm-integration/bug409102
Merge into: lp:openvista-gtm-integration
Diff against target: 41 lines
1 file modified
scripts/usr/sbin/ovinstanceadd (+21/-3)
To merge this branch: bzr merge lp:~jontai/openvista-gtm-integration/bug409102
Reviewer Review Type Date Requested Status
jeff.apple Approve
Review via email: mp+13749@code.launchpad.net
To post a comment you must log in.
Revision history for this message
jeff.apple (jeff-apple) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'scripts/usr/sbin/ovinstanceadd'
--- scripts/usr/sbin/ovinstanceadd 2009-08-11 20:47:56 +0000
+++ scripts/usr/sbin/ovinstanceadd 2009-10-22 01:00:24 +0000
@@ -111,8 +111,26 @@
111 exit 1111 exit 1
112fi112fi
113113
114# find the latest version of GT.M installed on this system 114# find the latest version of GT.M installed on this system. to qualify as a
115gtm=`ls -B -1 /opt/lsb-gtm 2> /dev/null | tail -n1`115# valid GT.M version, the GT.M directory must contain a mumps executable and an
116# openvista.xc file (the latter is installed by the corresponding
117# openvista-libs-* package)
118#
119# sort using only the GT.M version (not including the _ and the arch) because _
120# sorts after A, so if we were to use the entire directory name, V5.3-004A_i686
121# would come before V5.3-004_i686 (so V5.3-004_i686 would be considered the
122# "later" version), which is wrong.
123for version in `ls -1 -d /opt/lsb-gtm/V*_i686 /opt/lsb-gtm/V*_x86_64 2> /dev/null | cut -d _ -f 1 | sort -r`; do
124 # prefer 64-bit GT.M over 32-bit GT.M
125 if [ -x "${version}_x86_64/mumps" ] && [ -f "${version}_x86_64/openvista.xc" ]; then
126 gtm="${version}_x86_64"
127 break
128 fi
129 if [ -x "${version}_i686/mumps" ] && [ -f "${version}_i686/openvista.xc" ]; then
130 gtm="${version}_i686"
131 break
132 fi
133done
116134
117if [ -z "$gtm" ]; then135if [ -z "$gtm" ]; then
118 echo "ovinstanceadd: No versions of GT.M found in /opt/lsb-gtm" >&2136 echo "ovinstanceadd: No versions of GT.M found in /opt/lsb-gtm" >&2
@@ -159,7 +177,7 @@
159 install -o root -g $user -m 2770 -d "$root/$instance/backups" &&177 install -o root -g $user -m 2770 -d "$root/$instance/backups" &&
160 install -o root -g $user -m 2750 -d "$root/$instance/etc" &&178 install -o root -g $user -m 2750 -d "$root/$instance/etc" &&
161 install -o root -g $user -m 2770 -d "$root/$instance/tmp" &&179 install -o root -g $user -m 2770 -d "$root/$instance/tmp" &&
162 ln -s "/opt/lsb-gtm/$gtm" "$root/$instance/gtm"180 ln -s "$gtm" "$root/$instance/gtm"
163} || {181} || {
164 echo "ovinstanceadd: Unable to create instance directories" >&2182 echo "ovinstanceadd: Unable to create instance directories" >&2
165 exit 1183 exit 1

Subscribers

People subscribed via source and target branches