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

Proposed by Jon Tai
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jontai/openvista-gtm-integration/bug385755
Merge into: lp:openvista-gtm-integration
Diff against target: None lines
To merge this branch: bzr merge lp:~jontai/openvista-gtm-integration/bug385755
Reviewer Review Type Date Requested Status
jeff.apple Approve
Review via email: mp+7320@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
1=== modified file 'scripts/etc/init.d/openvista'
2--- scripts/etc/init.d/openvista 2009-04-23 16:33:14 +0000
3+++ scripts/etc/init.d/openvista 2009-06-11 04:58:31 +0000
4@@ -44,6 +44,7 @@
5 . /usr/lib/openvista/functions
6
7 root="/opt/openvista"
8+user="openvista"
9
10 run_hook()
11 {
12@@ -57,11 +58,17 @@
13
14 logger -p user.info -t "openvista[$$]" -- Running $routine in $instance
15
16- echo "HALT" \
17- | mumps -run "^$routine" 2>&1 \
18- | grep -v '^$' \
19- | logger -p user.info -t "openvista[$$]"
20- retval=${PIPESTATUS[1]}
21+ if [ `id -u` -eq 0 ]; then
22+ su -m -c "echo HALT | mumps -run \"^$routine\"" "$user" 2>&1 \
23+ | grep -v '^$' \
24+ | logger -p user.info -t "openvista[$$]"
25+ retval=${PIPESTATUS[0]}
26+ else
27+ echo HALT | mumps -run "^$routine" 2>&1 \
28+ | grep -v '^$' \
29+ | logger -p user.info -t "openvista[$$]"
30+ retval=${PIPESTATUS[1]}
31+ fi
32
33 # mumps returns 253 if the routine does not exist
34 if [ $retval -eq 253 ]; then

Subscribers

People subscribed via source and target branches