nmhw-auto-part: Fix hanging script

Probably due to an updated of parted, the changed line was not working
anymore.

BugzID: 74979
This commit is contained in:
Alexandre Bard 2021-09-27 16:54:04 +02:00 committed by Gitea
parent 4194e767fb
commit d60e2c476b
1 changed files with 5 additions and 1 deletions

View File

@ -134,7 +134,11 @@ expand_partition(){
local newend local newend
newend=$(($start + $newsize * 1024 * 1024 / $(cat /sys/block/$devicename/queue/hw_sector_size))) newend=$(($start + $newsize * 1024 * 1024 / $(cat /sys/block/$devicename/queue/hw_sector_size)))
parted $device ---pretend-input-tty resizepart 1 Yes ${newend}s >> /tmp/log/nmhw-auto-part.log 2>&1 || true parted $device ---pretend-input-tty resizepart 1 <<EOF >> /tmp/log/nmhw-auto-part.log 2>&1 || true
Yes
${newend}s
EOF
partprobe $device >> /tmp/log/nmhw-auto-part.log 2>&1 || true partprobe $device >> /tmp/log/nmhw-auto-part.log 2>&1 || true
resize2fs $partdevice >> /tmp/log/nmhw-auto-part.log 2>&1 resize2fs $partdevice >> /tmp/log/nmhw-auto-part.log 2>&1
} }