Skip to content

Commit b9e53e5

Browse files
committed
board/common: minor fixes to new boot status print
Also, these comments got lost, helps a bit understanding what's going on. Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 1a0dbec commit b9e53e5

File tree

1 file changed

+11
-4
lines changed
  • board/common/rootfs/usr/libexec/infix

1 file changed

+11
-4
lines changed

board/common/rootfs/usr/libexec/infix/mnt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ status()
133133

134134
print_start()
135135
{
136-
printf '\r%s%s' "$(status 3)" "$*" > /dev/console
136+
printf '\r\033[K%s%s' "$(status 3)" "$*" > /dev/console
137137
}
138138

139139
print_end()
@@ -146,6 +146,12 @@ print_end()
146146
fi
147147
}
148148

149+
# Restore Finit's original progress message so its [ OK ] appears correctly
150+
print_restore()
151+
{
152+
print_start "Mounting filesystems from /etc/fstab"
153+
}
154+
149155
# Helper to log resize error and create failure marker (stage 1)
150156
resize_err()
151157
{
@@ -245,9 +251,7 @@ resize_filesystem()
245251
mv /mnt/aux/resized.pending /mnt/aux/resized
246252
sync
247253

248-
# Restore Finit's original progress message so its [ OK ] appears correctly
249-
print_start "Mounting filesystems from /etc/fstab"
250-
254+
print_restore
251255
return 0
252256
}
253257

@@ -259,10 +263,13 @@ mount_rw()
259263
# Check if /var has been resized to fill the sdcard/eMMC
260264
if [ "$1" = "var" ] && is_mmc; then
261265
if [ -f /mnt/aux/resized ] || [ -f /mnt/aux/resized.failed ]; then
266+
# 3. Already done
262267
:
263268
elif [ -f /mnt/aux/resized.pending ]; then
269+
# 2. After reboot we can resize ext4
264270
resize_filesystem "$1"
265271
else
272+
# 1. Start with resizing the var partition to the end of the media
266273
resize_partition "$1"
267274
fi
268275
fi

0 commit comments

Comments
 (0)