From d37c10afae801505c045e93cdd6ff90394896e14 Mon Sep 17 00:00:00 2001 From: William Petit Date: Mon, 17 Apr 2023 11:30:50 +0200 Subject: [PATCH] fix(turris,omnia): disable reboot after resize temporarily --- .../omnia/uci-defaults/99-resize-disk.sh | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/misc/turris/omnia/uci-defaults/99-resize-disk.sh b/misc/turris/omnia/uci-defaults/99-resize-disk.sh index d54d720..67de3c9 100644 --- a/misc/turris/omnia/uci-defaults/99-resize-disk.sh +++ b/misc/turris/omnia/uci-defaults/99-resize-disk.sh @@ -1,25 +1,25 @@ #!/bin/sh -set -eo pipefail +# set -eo pipefail -FLAG_FILE=/root/.disk_resized +# FLAG_FILE=/root/.disk_resized -if [ -f "$FLAG_FILE" ]; then - exit -fi +# if [ -f "$FLAG_FILE" ]; then +# exit +# fi -DISK=/dev/mmcblk0 -PARTITION="${DISK}p2" +# DISK=/dev/mmcblk0 +# PARTITION="${DISK}p2" -parted -s -a opt "$DISK" "resizepart 2 100%" +# parted -s -a opt "$DISK" "resizepart 2 100%" -FS_SIZE="$(unsquashfs -s "$PARTITION" | grep -o 'Filesystem size [0-9]* bytes' | grep -o '[0-9][0-9]*')" -FS_OFFSET="$(expr '(' "$FS_SIZE" + 65535 ')' / 65536 '*' 65536)" -LOOP_DEVICE="$(losetup -f --show -o "$FS_OFFSET" "$PARTITION")" +# FS_SIZE="$(unsquashfs -s "$PARTITION" | grep -o 'Filesystem size [0-9]* bytes' | grep -o '[0-9][0-9]*')" +# FS_OFFSET="$(expr '(' "$FS_SIZE" + 65535 ')' / 65536 '*' 65536)" +# LOOP_DEVICE="$(losetup -f --show -o "$FS_OFFSET" "$PARTITION")" -e2fsck -y -f "$LOOP_DEVICE" -resize2fs "$LOOP_DEVICE" +# e2fsck -y -f "$LOOP_DEVICE" +# resize2fs "$LOOP_DEVICE" -touch "$FLAG_FILE" +# touch "$FLAG_FILE" -reboot \ No newline at end of file +# reboot \ No newline at end of file