-
Committer:
Scott Moser
-
Author(s):
Kevin Locke
-
Date:
2018-10-19 16:46:40 UTC
-
mfrom:
(322.2.2 fix-growpart-disk-symlink)
-
Revision ID:
smoser@ubuntu.com-20181019164640-r6ud3gk61gppgs8h
growpart: Resolve symbolic links before operating.
Disks can be referred to via symlink aliases, such as the ones in
/dev/disk/by-id and /dev/disk/by-path. These alias paths can have
different partition naming behavior than the un-aliased path. For
example, both of the above aliases add -partX to the name for partition
X, rather than just X. Previously this would cause growpart to fail
with the error:
failed to get start and end for ${dpart} in ${DISK}
Because the awk expression would not match the partition path. This
commit fixes the error by resolving symlink device paths before use.