From 9feefd2a9fe0b90c61db36ea26aa452a0128332c Mon Sep 17 00:00:00 2001 From: Jake Buchholz Date: Sat, 21 Nov 2020 18:21:26 -0800 Subject: [PATCH] Make sure busybox's mountpoint is used util-linux's busybox does not support -n which prevents root partition expansion. --- tiny-ec2-bootstrap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tiny-ec2-bootstrap b/tiny-ec2-bootstrap index 70a9f83..e5ae497 100644 --- a/tiny-ec2-bootstrap +++ b/tiny-ec2-bootstrap @@ -71,7 +71,7 @@ _run_userdata() { } _resize_root_partition() { - local mountpoint="$(mountpoint -n / | cut -d' ' -f1)" + local mountpoint="$(busybox mountpoint -n / | cut -d' ' -f1)" # mountpoint is the second partition... if echo "$mountpoint" | cut -d' ' -f1 | grep -qE '/(nvme\d+n\d+p|xvd[a-z]+)2$'; then @@ -82,7 +82,7 @@ _resize_root_partition() { partx -u "$volume" fi einfo "Resizing..." - resize2fs "$(mountpoint -n / | cut -d' ' -f1)" + resize2fs "$mountpoint" } _disable_password() {