main/postmarketos-mkinitfs: resize_root_partition: resize dm-* devices (MR 3216)

Prior to this commit, the initramfs was unable to resize the root
partition if it was on a device backed by the device mapper. This commit
fixes that now that it is possible for the root partition to lie on a
device mapper device.
This commit is contained in:
Richard Acayan 2022-06-09 19:55:27 -04:00 committed by Oliver Smith
parent 580ff69729
commit 20c7501b50
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-mkinitfs
pkgver=1.4.1
pkgrel=8
pkgrel=9
pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://postmarketos.org"
depends="
@ -72,5 +72,5 @@ sha512sums="
f827acb0a10c0e5c1631f1b712e91fde7eb4ade0f1174eb2ef1754018bf4518ea1ad3229fd335c25fb0c6fe46ae20890f5cf43e58c8143ae17b5ab9bb36f0199 postmarketos-mkinitfs-1.4.1.tar.gz
20f110337113e8de8999cf2a064a93fea36821d5c216bfa4ba46ec1f83825638262b92fd7be29eee0a85a54a108b7315a96cbe30da8ae4419f54c2ed53bb08c7 00-default.modules
ccdceaa710d97d6f57d8d66bfcbec448486d08083341712303f62123039f729229b88528308e411a308a2b90b81b60de89fe91143a6facbb11cbc9b4055eeaec init.sh
b6f433aa5a758e58ae4745f2b11f691f4d3ffbef35d9002bc2721ba797b3e7653e9449b6a1b503c47d725f644e0d7c0e5426f8a575f4cc437c21cfc6e2f4cdf3 init_functions.sh
5edd28de09d82fad95d94eedeb37173683db2675390098942f9cb6caddc3669fd423208687aafc2228d74be70aabc672360e19f1ea100771cdf79c1df80c5e02 init_functions.sh
"

View file

@ -318,7 +318,7 @@ resize_root_partition() {
# external partition.
if [ -z "${partition##"/dev/mapper/"*}" ]; then
# Get physical device
partition_dev=$(dmsetup deps -o devname "$partition" | \
partition_dev=$(dmsetup deps -o blkdevname "$partition" | \
awk -F "[()]" '{print "/dev/"$2}')
if has_unallocated_space "$partition_dev"; then
echo "Resize root partition ($partition)"