File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
FunKey/board/funkey/rootfs-overlay/usr/local/sbin Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ touch ${LOCK_FILE}
1818
1919# # Register ourself as the running FunKey task for receiving USR1
2020# # signal for shutting down
21- echo $$ > " /var/run/funkey.pid "
21+ pid record $$
2222
2323# # Binaries
2424PROD_SCREEN_BIN=" /usr/local/sbin/funkey_prod_screens"
@@ -224,7 +224,7 @@ function launch_tests_up_until_magnet {
224224
225225 # # Register ourself back as the running FunKey task for receiving USR1
226226 # # signal for shutting down
227- echo $$ > " /var/run/funkey.pid "
227+ pid record $$
228228
229229 # check magnet test result
230230 if [[ " $res " == " 0" ]]; then
Original file line number Diff line number Diff line change 44# set -x
55
66SELF=" $( basename ${0} ) "
7- PID_FILE=" /var/run/funkey.pid"
87PID_PATH=" /var/run/pid_path"
98REBOOTING_FILE=" /run/rebooting"
109
@@ -19,12 +18,12 @@ schedule_powerdown() {
1918
2019 # Save current pid path before closing bin
2120 # (won't work if bin is already closed)
22- pid_path=$( dirname $( readlink /proc/$( pid print) /exe) )
23- echo -n " $pid_path " > " $PID_PATH "
21+ local pid_path=$( dirname $( readlink /proc/$( pid print) /exe) )
22+ echo -n " ${ pid_path} " > " ${ PID_PATH} "
2423
2524 # Send USR1 signal to the running FunKey process to warn about
2625 # impending shutdown
27- pkill -USR1 -F " ${PID_FILE} " > /dev/null 2>&1
26+ pkill -USR1 " $( pid print ) " > /dev/null 2>&1
2827
2928 # Delay for the given grace period seconds to catch signal USR2.
3029 # If the signal is caught, then it means the running FunKey
You can’t perform that action at this time.
0 commit comments