working automatic partition update

Signed-off-by: Michel Stempin <michel.stempin@wanadoo.fr>
This commit is contained in:
Michel Stempin
2020-10-25 22:04:47 +01:00
parent 115b031565
commit 332feb6fe9
5 changed files with 128 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
#!/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