diff --git a/packer/scripts/cloud.sh b/packer/scripts/cloud.sh index e942f87..328d194 100644 --- a/packer/scripts/cloud.sh +++ b/packer/scripts/cloud.sh @@ -5,20 +5,10 @@ echo "Defaults:void !requiretty" >> /etc/sudoers.d/99-void chmod 0440 /etc/sudoers.d/99-void mv /etc/sudoers.d/{,10-}wheel -xbps-fetch -o /usr/bin/growpart https://raw.githubusercontent.com/canonical/cloud-utils/ubuntu/0.31-22-g37d4e32a-0ubuntu1/bin/growpart -chmod +x /usr/bin/growpart - -xbps-install -Sy util-linux coreutils sed shinit +xbps-install -Sy util-linux coreutils sed shinit cloud-guest-utils ln -s /etc/sv/shinit /var/service/ -cat <<'EOF' > /etc/runit/core-services/10-resize-root.sh -#!/bin/sh -rpart=$(findmnt -r -o SOURCE -v -n /) -rnum=$(cat /sys/class/block/$(basename $rpart)/partition) - -/usr/bin/growpart ${rpart%%$rnum} $rnum -resize2fs $rpart -EOF +sed -i -e 's/#ENABLE/ENABLE/' /etc/default/growpart passwd -dl void passwd -dl root