Commit 845c224f authored by Claes Sjofors's avatar Claes Sjofors

pwr kill bugfix, plc wasn't removed

parent e274a910
...@@ -36,10 +36,15 @@ create_killer() ...@@ -36,10 +36,15 @@ create_killer()
echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "plc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "jpwr.rt" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
echo "if [ -e $pwrp_exe/pwrp_stop.sh ]; then" >> $killer
echo " source $pwrp_exe/pwrp_stop.sh" >> $killer
echo "fi" >> $killer
echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
chmod a+rx $killer chmod a+rx $killer
...@@ -123,17 +128,17 @@ case "$1" ...@@ -123,17 +128,17 @@ case "$1"
echo "Done." echo "Done."
;; ;;
kill) kill)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
reset) reset)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
*) *)
echo " pwrsev Start and stop Proview Storage Environment" >&2 echo " pwrsev Start and stop Proview Runtime Environment" >&2
echo "" >&2 echo "" >&2
echo " Usage:" >&2 echo " Usage:" >&2
echo " pwr start|stop|restart|reload|reset" >&2 echo " pwr start|stop|restart|reload|reset" >&2
......
...@@ -46,12 +46,17 @@ create_killer() ...@@ -46,12 +46,17 @@ create_killer()
echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "plc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "jpwr.rt" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
echo "if [ -e $pwrp_exe/pwrp_stop.sh ]; then" >> $killer
echo " source $pwrp_exe/pwrp_stop.sh" >> $killer
echo "fi" >> $killer
echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
chmod a+rx $killer chmod a+rx $killer
if [ ! -e $killer ] ;then if [ ! -e $killer ] ;then
echo "$killer not writable, check permissions" echo "$killer not writable, check permissions"
...@@ -133,17 +138,17 @@ case "$1" ...@@ -133,17 +138,17 @@ case "$1"
echo "Done." echo "Done."
;; ;;
kill) kill)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
reset) reset)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
*) *)
echo " pwr Start and stop Proview Storage Environment" >&2 echo " pwr Start and stop Proview Runtime Environment" >&2
echo "" >&2 echo "" >&2
echo " Usage:" >&2 echo " Usage:" >&2
echo " pwr start|stop|restart|reload|reset" >&2 echo " pwr start|stop|restart|reload|reset" >&2
......
...@@ -42,10 +42,15 @@ create_killer() ...@@ -42,10 +42,15 @@ create_killer()
echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "plc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "jpwr.rt" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
echo "if [ -e $pwrp_exe/pwrp_stop.sh ]; then" >> $killer
echo " source $pwrp_exe/pwrp_stop.sh" >> $killer
echo "fi" >> $killer
echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
chmod a+rx $killer chmod a+rx $killer
...@@ -129,17 +134,17 @@ case "$1" ...@@ -129,17 +134,17 @@ case "$1"
echo "Done." echo "Done."
;; ;;
kill) kill)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
reset) reset)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
*) *)
echo " pwrsev Start and stop Proview Storage Environment" >&2 echo " pwrsev Start and stop Proview Runtime Environment" >&2
echo "" >&2 echo "" >&2
echo " Usage:" >&2 echo " Usage:" >&2
echo " pwr start|stop|restart|reload|reset" >&2 echo " pwr start|stop|restart|reload|reset" >&2
......
...@@ -46,12 +46,17 @@ create_killer() ...@@ -46,12 +46,17 @@ create_killer()
echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "plc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "jpwr.rt" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
echo "if [ -e $pwrp_exe/pwrp_stop.sh ]; then" >> $killer
echo " source $pwrp_exe/pwrp_stop.sh" >> $killer
echo "fi" >> $killer
echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
chmod a+rx $killer chmod a+rx $killer
if [ ! -e $killer ] ;then if [ ! -e $killer ] ;then
echo "$killer not writable, check permissions" echo "$killer not writable, check permissions"
...@@ -133,17 +138,17 @@ case "$1" ...@@ -133,17 +138,17 @@ case "$1"
echo "Done." echo "Done."
;; ;;
kill) kill)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
reset) reset)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
*) *)
echo " pwr Start and stop Proview Storage Environment" >&2 echo " pwr Start and stop Proview Runtime Environment" >&2
echo "" >&2 echo "" >&2
echo " Usage:" >&2 echo " Usage:" >&2
echo " pwr start|stop|restart|reload|reset" >&2 echo " pwr start|stop|restart|reload|reset" >&2
......
...@@ -36,10 +36,15 @@ create_killer() ...@@ -36,10 +36,15 @@ create_killer()
echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "plc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "jpwr.rt" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
echo "if [ -e $pwrp_exe/pwrp_stop.sh ]; then" >> $killer
echo " source $pwrp_exe/pwrp_stop.sh" >> $killer
echo "fi" >> $killer
echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
chmod a+rx $killer chmod a+rx $killer
...@@ -123,12 +128,12 @@ case "$1" ...@@ -123,12 +128,12 @@ case "$1"
echo "Done." echo "Done."
;; ;;
kill) kill)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
reset) reset)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
......
...@@ -46,12 +46,17 @@ create_killer() ...@@ -46,12 +46,17 @@ create_killer()
echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "plc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "jpwr.rt" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
echo "if [ -e $pwrp_exe/pwrp_stop.sh ]; then" >> $killer
echo " source $pwrp_exe/pwrp_stop.sh" >> $killer
echo "fi" >> $killer
echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
chmod a+rx $killer chmod a+rx $killer
if [ ! -e $killer ] ;then if [ ! -e $killer ] ;then
echo "$killer not writable, check permissions" echo "$killer not writable, check permissions"
...@@ -133,17 +138,17 @@ case "$1" ...@@ -133,17 +138,17 @@ case "$1"
echo "Done." echo "Done."
;; ;;
kill) kill)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
reset) reset)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
*) *)
echo " pwr Start and stop Proview Storage Environment" >&2 echo " pwr Start and stop Proview Runtime Environment" >&2
echo "" >&2 echo "" >&2
echo " Usage:" >&2 echo " Usage:" >&2
echo " pwr start|stop|restart|reload|reset" >&2 echo " pwr start|stop|restart|reload|reset" >&2
......
...@@ -46,12 +46,17 @@ create_killer() ...@@ -46,12 +46,17 @@ create_killer()
echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "plc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "jpwr.rt" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
echo "if [ -e $pwrp_exe/pwrp_stop.sh ]; then" >> $killer
echo " source $pwrp_exe/pwrp_stop.sh" >> $killer
echo "fi" >> $killer
echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
chmod a+rx $killer chmod a+rx $killer
if [ ! -e $killer ] ;then if [ ! -e $killer ] ;then
echo "$killer not writable, check permissions" echo "$killer not writable, check permissions"
...@@ -133,17 +138,17 @@ case "$1" ...@@ -133,17 +138,17 @@ case "$1"
echo "Done." echo "Done."
;; ;;
kill) kill)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
reset) reset)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
*) *)
echo " pwr Start and stop Proview Storage Environment" >&2 echo " pwr Start and stop Proview Runtime Environment" >&2
echo "" >&2 echo "" >&2
echo " Usage:" >&2 echo " Usage:" >&2
echo " pwr start|stop|restart|reload|reset" >&2 echo " pwr start|stop|restart|reload|reset" >&2
......
...@@ -46,12 +46,17 @@ create_killer() ...@@ -46,12 +46,17 @@ create_killer()
echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "plc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "jpwr.rt" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
echo "if [ -e $pwrp_exe/pwrp_stop.sh ]; then" >> $killer
echo " source $pwrp_exe/pwrp_stop.sh" >> $killer
echo "fi" >> $killer
echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
chmod a+rx $killer chmod a+rx $killer
if [ ! -e $killer ] ;then if [ ! -e $killer ] ;then
echo "$killer not writable, check permissions" echo "$killer not writable, check permissions"
...@@ -133,17 +138,17 @@ case "$1" ...@@ -133,17 +138,17 @@ case "$1"
echo "Done." echo "Done."
;; ;;
kill) kill)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
reset) reset)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
*) *)
echo " pwr Start and stop Proview Storage Environment" >&2 echo " pwr Start and stop Proview Runtime Environment" >&2
echo "" >&2 echo "" >&2
echo " Usage:" >&2 echo " Usage:" >&2
echo " pwr start|stop|restart|reload|reset" >&2 echo " pwr start|stop|restart|reload|reset" >&2
......
...@@ -46,12 +46,17 @@ create_killer() ...@@ -46,12 +46,17 @@ create_killer()
echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "ra_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "sev_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer echo "`ps ax | grep "opc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "plc_" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "`ps ax | grep "jpwr.rt" | awk '{ print "kill -9 "$1}'`" >> $killer
echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer echo "eval `ipcs -s|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm sem %s;", $2}'`" >> $killer
echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer echo "eval `ipcs -q|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm msg %s;", $2}'`" >> $killer
echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer echo "eval `ipcs -m|grep ^0x|grep "[ \t]pwrp[ \t]"|awk '{printf "ipcrm shm %s;", $2}'`" >> $killer
echo "if [ -e $pwrp_exe/pwrp_stop.sh ]; then" >> $killer
echo " source $pwrp_exe/pwrp_stop.sh" >> $killer
echo "fi" >> $killer
echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer echo "rm /tmp/pwr*\$PWR_BUS_ID" >> $killer
chmod a+rx $killer chmod a+rx $killer
if [ ! -e $killer ] ;then if [ ! -e $killer ] ;then
echo "$killer not writable, check permissions" echo "$killer not writable, check permissions"
...@@ -133,17 +138,17 @@ case "$1" ...@@ -133,17 +138,17 @@ case "$1"
echo "Done." echo "Done."
;; ;;
kill) kill)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
reset) reset)
echo "Remove all processes and resources for Proview Storage Environment" echo "Remove all processes and resources for Proview Runtime Environment"
pwr_kill pwr_kill
echo "Done." echo "Done."
;; ;;
*) *)
echo " pwr Start and stop Proview Storage Environment" >&2 echo " pwr Start and stop Proview Runtime Environment" >&2
echo "" >&2 echo "" >&2
echo " Usage:" >&2 echo " Usage:" >&2
echo " pwr start|stop|restart|reload|reset" >&2 echo " pwr start|stop|restart|reload|reset" >&2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment