Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
f70dc762
Commit
f70dc762
authored
Sep 04, 2014
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pwr kill, read ld_appl file to kill applications
parent
92839568
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
0 deletions
+80
-0
src/exp/com/src/os_linux/pwr_stop.sh
src/exp/com/src/os_linux/pwr_stop.sh
+40
-0
src/tools/pkg/deb/pwrrt/pwr
src/tools/pkg/deb/pwrrt/pwr
+40
-0
No files found.
src/exp/com/src/os_linux/pwr_stop.sh
View file @
f70dc762
...
...
@@ -68,6 +68,46 @@
eval
`
ipcs
-m
|grep ^0x|grep
"[
\t
]
$user
[
\t
]"
|awk
'{printf "ipcrm shm %s;", $2
}'
`
node
=
`
eval uname
-n
`
applfile
=
$pwrp_load
"/ld_appl_"
$node
"_"
$PWR_BUS_ID
".txt"
if
[
-e
$applfile
]
;
then
stored_ifs
=
$IFS
IFS
=
' ,'
while
read
appid appname appload apprun appfile appprio appdebug apparg
;
do
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
killall
$appname
fi
fi
done
<
$applfile
IFS
=
$stored_ifs
fi
if
[
-e
$pwrp_exe
/pwrp_stop.sh
]
;
then
source
$pwrp_exe
/pwrp_stop.sh
fi
...
...
src/tools/pkg/deb/pwrrt/pwr
View file @
f70dc762
...
...
@@ -52,6 +52,46 @@ create_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
-m
|grep ^0x|grep
"[
\t
]pwrp[
\t
]"
|awk
'{printf "ipcrm shm %s;", $2}'
`
"
>>
$killer
node
=
`
eval uname
-n
`
applfile
=
$pwrp_load
"/ld_appl_"
$node
"_"
$PWR_BUS_ID
".txt"
if
[
-e
$applfile
]
;
then
stored_ifs
=
$IFS
IFS
=
' ,'
while
read
appid appname appload apprun appfile appprio appdebug apparg
;
do
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
"killall
$appname
"
>>
$killer
fi
fi
done
<
$applfile
IFS
=
$stored_ifs
fi
echo
"if [ -e
$pwrp_exe
/pwrp_stop.sh ]; then"
>>
$killer
echo
" source
$pwrp_exe
/pwrp_stop.sh"
>>
$killer
echo
"fi"
>>
$killer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment