Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Commit 398f1e4

Browse files
authored
Merge pull request #72 from beerwatch/patch-1
Update loc-05-grow-rootfs##one
2 parents f84361a + 85c1b24 commit 398f1e4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/etc/one-context.d/loc-05-grow-rootfs##one

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ if [ "${LVM}" != "no" ]; then
2828
PARTITION=$(pvdisplay |grep "PV Name"|awk '{print $3}'| sed "s|^${DISK}||")
2929
PV=$(pvdisplay |grep "PV Name"|awk '{print $3}')
3030
LV=$(lvdisplay ${DEVICE} |grep "LV Path"|awk '{print $3}')
31+
TABLE=$(parted ${DISK} print | grep 'Partition Table:' | awk '{print $3}' | grep 'msdos' | wc -l)
32+
if [ ${TABLE} -ne 0 -a ${PARTITION} -gt 4 ]; then
33+
PARTITION="$(parted ${DISK} print | grep 'extended' | awk '{print $1}') $PARTITION"
34+
fi
3135
fi
3236

3337
if [ -n "$DEBUG" ]; then
@@ -37,7 +41,9 @@ if [ -n "$DEBUG" ]; then
3741
echo PARTITION: ${PARTITION}
3842
fi
3943

40-
${GROWPART} ${DISK} ${PARTITION}
44+
for PART in ${PARTITION} ; do
45+
${GROWPART} ${DISK} ${PART}
46+
done
4147

4248
if [ "${LVM}" != "no" ]; then
4349
${PVRESIZE} ${PV}

0 commit comments

Comments
 (0)