mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2025-12-15 00:58:52 +01:00
changed Recovery script boot order
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
3585de05ce
commit
5ee4e8eb83
@ -1,24 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
THIS=$(basename $0)
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
for file in /mnt/FunKey-*.swu; do
|
|
||||||
swupdate -v -i "${file}"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
share start
|
|
||||||
mkdir -p /run/network
|
|
||||||
/sbin/ifup -a
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
normal_mode
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {start|stop}" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
39
Recovery/board/funkey/rootfs-overlay/etc/init.d/S60recovery
Executable file
39
Recovery/board/funkey/rootfs-overlay/etc/init.d/S60recovery
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
THIS=$(basename $0)
|
||||||
|
|
||||||
|
source /usr/local/lib/utils
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
keys=$(devmem 0x01c20500 16)
|
||||||
|
if [ "${keys}" != "0xF83F" ]; then
|
||||||
|
|
||||||
|
# Automatic update requested
|
||||||
|
updates=$(ls /mnt/FunKey-*.swu)
|
||||||
|
if [ "x${updates}" = "x" ]; then
|
||||||
|
menu &
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
for file in ${updates} ; do
|
||||||
|
swupdate -i "${file}"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
menu &
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
notif "^^^^^^^^ RESTARTING...^^^^^^^^"
|
||||||
|
normal_mode
|
||||||
|
else
|
||||||
|
|
||||||
|
# Manual Recovery mode following Fn + Start keypress during boot
|
||||||
|
menu &
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
Loading…
x
Reference in New Issue
Block a user