From: Dermot Bradley Date: Tue, 10 Nov 2020 10:37 +0000 Subject: [PATCH] cloud-utils: Make growpart not rely on udevadm Version 0.32 of cloud-utils added a call to "udevadm settle" in growpart, so adding a dependancy on eudev to the cloud-utils-growpart package. This patch enables growpart to run without requiring eudev so that it can be used on mdev-based systems also. --- diff -aur a/bin/growpart b/bin/growpart --- a/bin/growpart +++ b/bin/growpart @@ -173,13 +173,14 @@ local settle=${2-"1"} # release the lock on a disk if locked. When a disk is locked, # FLOCK_DISK_FD is set to the hard-coded value of 9. - # After unlocking run udevadm settle as the disk has likely been changed. + # After unlocking run udevadm settle (if installed) as the disk has + # likely been changed. [ "${DRY_RUN}" = 0 ] || return [ -n "${FLOCK_DISK_FD}" ] || return debug 1 "FLOCK: ${disk}: releasing exclusive lock" exec 9>&- - [ "${settle}" = 1 ] && udevadm settle + [ "${settle}" = 1 ] && [ -x /bin/udevadm ] && udevadm settle FLOCK_DISK_FD="" }