Merge pull request #8817 from HiassofT/le12-fs-resize

busybox: use mke2fs instead of resize2fs
This commit is contained in:
CvH 2024-05-01 21:02:33 +02:00 committed by GitHub
commit a17a09c760
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,10 +47,13 @@ if [ -e /storage/.please_resize_me ] ; then
rm -f /storage/.please_resize_me
sync
echo "DISK: $DISK PART: $PART" >>$LOG
LABEL=$(blkid -o value -s LABEL $PART)
UUID=$(blkid -o value -s UUID $PART)
echo "DISK: $DISK PART: $PART LABEL: $LABEL UUID: $UUID" >>$LOG
# just in case
if [ ! -z "$DISK" -a ! -z "$PART" ] ; then
if [ ! -z "$DISK" -a ! -z "$PART" -a ! -z "$UUID" ] ; then
umount $PART
echo "PARTITION RESIZING IN PROGRESS"
@ -59,8 +62,8 @@ if [ -e /storage/.please_resize_me ] ; then
echo ""
StartProgressLog spinner "Resizing partition... " "parted -s -f -m $DISK resizepart 2 100% >>$LOG 2>&1"
StartProgressLog spinner "Creating file system... " "mke2fs -F -q -t ext4 -m 0 -L \"$LABEL\" -U \"$UUID\" $PART >>$LOG 2>&1"
StartProgressLog spinner "Checking file system... " "e2fsck -f -p $PART >>$LOG 2>&1"
StartProgressLog spinner "Resizing file system... " "resize2fs $PART >>$LOG 2>&1"
StartProgress countdown "Rebooting in 15s... " 15 "NOW"
else
echo "Partition was not detected - resizing aborted."