Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Development pwr_stop.sh bug (V 5.2)

Development pwr_stop.sh bug (V 5.2) 9 years 5 months ago #6898

  • abella
  • abella's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 42
  • Karma: 0
Hi,

In the new V5.2, while using Stop project in development in the Runtime Monitor window, I get the error in the image:

pwr_stop_sh.png


After a failed stop, I get some other errors about remaining files if i try to start the project again.

I think the problem is that pwr_stop.sh is executed in an 'sh' shell and code as ${var:x:y} is only compatible with 'bash' shell. The error in the development console is from 'sh'.

I've made a couple of changes in the script and it seems to work for me:
line: 77 in pwr_stop.sh

    while read appid appname appload apprun appfile appprio appdebug apparg; do    
       if [ -n "$appid" ] && [  `echo "${appid}"|cut -c1-1` != "#" ]; then      
#       if [ -n "$appid" ] && [ "${appid:0:1}" != "#" ]; then
        if [ $appid != "pwr_neth" ] && 
           [ $appid != "pwr_qmon" ] &&
           [ $appid != "pwr_nacp" ] &&
           [ $appid != "pwr_io" ] &&
           [ $appid != "pwr_tmon" ] &&
           [ $appid != "pwr_emon" ] &&
           [ $appid != "pwr_alim" ] &&
           [ $appid != "pwr_bck" ] &&
           [ $appid != "pwr_linksup" ] &&
           [ $appid != "pwr_trend" ] &&
           [ $appid != "pwr_fast" ] &&
           [ $appid != "pwr_remh" ] &&
           [ $appid != "pwr_remlog" ] &&
           [ $appid != "pwr_webmon" ] &&
           [ $appid != "pwr_webmonmh" ] &&
           [ $appid != "pwr_webmonelog" ] &&
           [ $appid != "pwr_opc_server" ] &&
           [ $appid != "pwr_post" ] &&
           [ $appid != "pwr_report" ] &&
           [ $appid != "pwr_sevhistmon" ] &&
           [ $appid != "pwr_sev_server" ] &&
           [ $appid != "pwr_powerlink" ] &&
           [ $appid != "pwr_sim" ] &&
           [ $appid != "pwr_plc" ] &&
#           [ ${appid:0:8} != "pwr_plc_" ]; then
           [ `echo "${appid}"|cut -c1-8` != "pwr_plc_" ]; then
          killall $appname
        fi
      fi
	  
    done < $applfile

Changed lines are the commented ones.
Last Edit: 9 years 5 months ago by abella. Reason: In V5.2 version !!
The administrator has disabled public write access.

Development pwr_stop.sh bug (V 5.2) 9 years 5 months ago #6899

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3176
  • Thank you received: 502
  • Karma: 133
Thanks for the feedback.

The current packages and source code are updated with similar modifications.

/Claes
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.344 seconds