Hi Hans,

Following patch addressed the `checkbashisms osaf-transport-monitor` errors , I would like to publish this
if no other things needs to be addressed .

=========================================================================================================================================
diff --git a/osaf/services/infrastructure/dtms/scripts/osaf-transport-monitor.in b/osaf/services/infrastructure/dtms/scripts/osaf-transport-monitor.in
--- a/osaf/services/infrastructure/dtms/scripts/osaf-transport-monitor.in
+++ b/osaf/services/infrastructure/dtms/scripts/osaf-transport-monitor.in
@@ -43,8 +43,8 @@ start() {
                    fi

                     if [ ! "$MDS_TRANSPORT" = "TIPC" ] ; then
-                        COUNT=0
-                        while ((COUNT < 15))
+                        count=0
+                        while [ $count -le 15 ]
                         do
                            pidval=`cat $pkgpiddir/$prog.pid`
                            if  ! test -d /proc/$pidval ; then
@@ -52,9 +52,9 @@ start() {
                              $pkglibdir/opensaf_reboot 0
                              exit 0;
                            fi
- #logger "osafdtmd PID : $pidval monitor COUNT = $COUNT" + #logger "osafdtmd PID : $pidval monitor count = $count"
                            sleep 1
-                           ((COUNT=COUNT+1))
+                           count=`expr $count + 1`
                         done
                    else
                        sleep 15
===========================================================================================================================================

-AVM


On 11/12/2013 2:04 PM, Hans Feldt wrote:

  * *status*: unassigned --> invalid

------------------------------------------------------------------------

*[tickets:#618] <http://sourceforge.net/p/opensaf/tickets/618/> osaf-transport-monitor loops on systems where sh is not bash*

*Status:* invalid
*Created:* Wed Nov 06, 2013 03:55 PM UTC by Hans Feldt
*Last Updated:* Wed Nov 06, 2013 04:20 PM UTC
*Owner:* nobody

and creates a lot of CPU load

system: ubuntu 13.10 (/bin/sh is dash)

If the script shebang is changed to bash it works

checkbashisms shows this:

$ checkbashisms opensaf-staging/osaf/services/infrastructure/dtms/scripts/osaf-transport-monitor possible bashism in opensaf-repos/opensaf-staging/osaf/services/infrastructure/dtms/scripts/osaf-transport-monitor line 47 ('((' should be '$(('):
while ((COUNT < 15))
possible bashism in opensaf-repos/opensaf-staging/osaf/services/infrastructure/dtms/scripts/osaf-transport-monitor line 57 ('((' should be '$(('):
((COUNT=COUNT+1))

------------------------------------------------------------------------

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.



------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk


_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to