From 3eb740380b726096111e69870aca1f10f54a01bc Mon Sep 17 00:00:00 2001 From: Piotr86PL <39170443+Piotr86PL@users.noreply.github.com> Date: Fri, 30 Sep 2022 21:28:09 +0200 Subject: [PATCH 1/2] Fixing a typo in the calculate_float function and adding a couple of messages to the resizing functions --- .../FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh b/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh index f8e024b..dea126c 100644 --- a/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh +++ b/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh @@ -260,6 +260,7 @@ expandPartition() { ;; btrfs) # Based on info from @mstabrin on forums.fogproject.org + dots "Resizing $fstype volume ($part)" if [[ ! -d /tmp/btrfs ]]; then mkdir /tmp/btrfs >>/tmp/btfrslog.txt 2>&1 if [[ $? -gt 0 ]]; then @@ -610,7 +611,7 @@ shrinkPartition() { resetFlag "$part" ;; extfs) - dots "Checking $fstype volume ($part)" + dots "Checking $fstype volume ($part) before shrinking" e2fsck -fp $part >/tmp/e2fsck.txt 2>&1 case $? in 0) @@ -646,6 +647,7 @@ shrinkPartition() { resizePartition "$part" "$sizeextresize" "$imagePath" echo "Done" debugPause + dots "Checking $fstype volume ($part) after shrinking" e2fsck -fp $part >/tmp/e2fsck.txt 2>&1 case $? in 0) @@ -665,6 +667,7 @@ shrinkPartition() { btrfs) # Based on info from @mstabrin on forums.fogproject.org # https://forums.fogproject.org/topic/15159/btrfs-postdownloadscript/3 + dots "Shrinking $part partition" if [[ ! -d /tmp/btrfs ]]; then mkdir /tmp/btrfs >>/tmp/btfrslog.txt 2>&1 if [[ $? -gt 0 ]]; then @@ -2516,5 +2519,5 @@ calculate() { } # Calculates information and returns full float calculate_float() { - echo $(awk 'BEGIN{printf "%f\n"}, '$*'}'); + echo $(awk 'BEGIN{printf "%f\n", '$*'}'); } From 3ee6684823320b1cd0a620eeeaa2b53acd3e3b1c Mon Sep 17 00:00:00 2001 From: Piotr86PL <39170443+Piotr86PL@users.noreply.github.com> Date: Sat, 1 Oct 2022 17:16:54 +0200 Subject: [PATCH 2/2] Change of two messages as they become too long --- .../board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh b/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh index dea126c..ecb9516 100644 --- a/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh +++ b/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh @@ -611,7 +611,7 @@ shrinkPartition() { resetFlag "$part" ;; extfs) - dots "Checking $fstype volume ($part) before shrinking" + dots "Checking $fstype volume ($part)" e2fsck -fp $part >/tmp/e2fsck.txt 2>&1 case $? in 0) @@ -647,7 +647,7 @@ shrinkPartition() { resizePartition "$part" "$sizeextresize" "$imagePath" echo "Done" debugPause - dots "Checking $fstype volume ($part) after shrinking" + dots "Checking $fstype volume ($part)" e2fsck -fp $part >/tmp/e2fsck.txt 2>&1 case $? in 0)