From c02f84541ab4e85bd2c02522d468327b86b5af3a Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Tue, 21 Jul 2015 22:44:41 -0400 Subject: [PATCH] gh-10: support device links in mtab The device in mtab can be a link, for example /dev/disk/by-label/root --- base/etc/one-context.d/07-grow-rootfs | 1 + 1 file changed, 1 insertion(+) diff --git a/base/etc/one-context.d/07-grow-rootfs b/base/etc/one-context.d/07-grow-rootfs index 2874a99..e584b0d 100755 --- a/base/etc/one-context.d/07-grow-rootfs +++ b/base/etc/one-context.d/07-grow-rootfs @@ -3,6 +3,7 @@ MOUNT_LINE=$(cat /etc/mtab | grep ' / ' | grep -v '^rootfs') DEVICE=$(echo "$MOUNT_LINE" | cut -d' ' -f1) +DEVICE=$(readlink -f "$DEVICE") FSTYPE=$(echo "$MOUNT_LINE" | cut -d' ' -f3) DISK=$(echo "$DEVICE" | sed 's/.$//')