sbc-images/includes/post/expand-rootfs.ksi

17 lines
552 B
Plaintext
Raw Normal View History

2023-09-13 01:29:56 +00:00
%post
set -x
# Setup networking temporarily
[ -f /etc/resolv.conf ] || echo "nameserver 1.1.1.1" > /etc/resolv.conf
# The script that expands root partition
[ -d /usr/local/bin ] || mkdir --verbose /usr/local/bin
curl 'https://git.thefossguy.com/enterprise-linux/sbc-images/raw/branch/rocky-generic/scripts/expand-rootfs.sh' --output /usr/local/bin/expand-rootfs.sh || exit 1
[ -f /usr/local/bin/expand-rootfs.sh ] && \
chmod --verbose +x /usr/local/bin/expand-rootfs.sh
# Remove the temporary 'resolv.conf' file
rm -v -f /etc/resolv.conf
%end