fix notif in update_partition script

Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
Michel-FK 2021-05-24 23:01:42 +02:00
parent 4b519d9911
commit 6a43bca1e6
1 changed files with 7 additions and 7 deletions

View File

@ -9,7 +9,7 @@ root_mount=/tmp/rootfs
do_preinst() do_preinst()
{ {
notif " 1/4 EXTRACT FIRMWARE UPDATE..^DO NOT TURN OFF THE CONSOLE" notif set 0 " 1/4 EXTRACT FIRMWARE UPDATE..^DO NOT TURN OFF THE CONSOLE"
exit 0 exit 0
} }
@ -19,23 +19,23 @@ do_postinst()
################# #################
# Resize Rootfs # # Resize Rootfs #
################# #################
notif " 2/4 RESIZE ROOT FILESYSTEM^DO NOT TURN OFF THE CONSOLE" notif set 0 " 2/4 RESIZE ROOT FILESYSTEM^DO NOT TURN OFF THE CONSOLE"
resize2fs ${root_part} resize2fs ${root_part}
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
notif " CANNOT RESIZE ROOT^FILESYSTEM" notif set 0 " CANNOT RESIZE ROOT^FILESYSTEM"
exit 1 exit 1
fi fi
############################## ##############################
# SHARED PARTITION PROCESSES # # SHARED PARTITION PROCESSES #
############################## ##############################
notif " 3/4 COPY OPKS TO USB MOUNT^DO NOT TURN OFF THE CONSOLE" notif set 0 " 3/4 COPY OPKS TO USB MOUNT^DO NOT TURN OFF THE CONSOLE"
# Mount Rootfs # Mount Rootfs
mkdir -p ${root_mount} mkdir -p ${root_mount}
mount -t ext4 ${root_part} ${root_mount} mount -t ext4 ${root_part} ${root_mount}
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
notif "CANNOT MOUNT ROOT^FILESYSTEM" notif set 0 "CANNOT MOUNT ROOT^FILESYSTEM"
exit 1 exit 1
fi fi
@ -48,7 +48,7 @@ do_postinst()
# Unmount Rootfs # Unmount Rootfs
umount ${root_mount} umount ${root_mount}
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
notif "CANNOT UNMOUNT ROOT^FILESYSTEM" notif set 0 "CANNOT UNMOUNT ROOT^FILESYSTEM"
exit 1 exit 1
fi fi
@ -66,7 +66,7 @@ do_postinst()
# Erase update file # # Erase update file #
##################### #####################
for file in $(ls /mnt/FunKey-*.fwu); do for file in $(ls /mnt/FunKey-*.fwu); do
notif " 4/4 ERASE UPDATE FILE^DO NOT TURN OFF THE CONSOLE" notif set 0 " 4/4 ERASE UPDATE FILE^DO NOT TURN OFF THE CONSOLE"
rm -f "${file}" rm -f "${file}"
done done
exit 0 exit 0