tool/run/image/disk: find resize2fs in /usr/sbin

This patch adjusts the run/image/disk plugin to search for resize2fs in
/usr/sbin, which is not included in the PATH variable on Debian by
default.

Issue #4746
This commit is contained in:
Norman Feske 2023-01-27 15:32:16 +01:00 committed by Christian Helmuth
parent 21a9527686
commit 11ff774f72

View File

@ -54,7 +54,7 @@ proc run_image { } {
if {[image_disk_size] == 0} {
# resize image to only needed size and get size of resized image
exec resize2fs -M [run_dir].partition 2>/dev/null
exec [installed_command resize2fs] -M [run_dir].partition 2>/dev/null
set disk_size_b [expr [regsub {\s.*} [exec wc -c [run_dir].partition] {}]]
set disk_size_kb [expr $disk_size_b / 1024]
}