mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2026-03-29 08:12:49 +02:00
Added the utility scripts
This commit is contained in:
15
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/sched_shutdown
Executable file
15
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/sched_shutdown
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "${#}" != "1" ]; then
|
||||
echo "Usage: $0 seconds_before_shutdown"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nb_secs_to_wait=$1
|
||||
|
||||
# Wait $nb_secs_to_wait seconds to catch signal USR2
|
||||
# If the signal is caught, then it means a process canceled this shutdown
|
||||
sleep ${nbl_secs_to_wait}
|
||||
|
||||
# Too late to cancel: init shutdown
|
||||
shutdown_funkey
|
||||
Reference in New Issue
Block a user