mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 03:05:48 +03:00
In upstream 0.32 a call to "udevadm settle" was added to growpart. Add a patch to growpart to make this call optional and remove eudev from cloud-utils-growpart package dependencies so that growpart can be used on non-udev systems.
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From: Dermot Bradley <dermot_bradley@yahoo.com>
|
|
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=""
|
|
}
|
|
|