Compare commits
No commits in common. "358b27f061d3bd10824f737817dbe5d144cfa80a" and "3539a131d8a3b618dc20ed24b756f1e61b109813" have entirely different histories.
358b27f061
...
3539a131d8
@ -4,9 +4,7 @@ set -x
|
||||
# The script that expands root partition
|
||||
[ -d /usr/local/bin ] || mkdir --verbose /usr/local/bin
|
||||
curl 'https://git.resf.org/thefossguy/sbc-images/raw/branch/rocky-generic/scripts/expand-rootfs.sh' --output /usr/local/bin/expand-rootfs.sh || exit 1
|
||||
curl 'https://git.resf.org/thefossguy/sbc-images/raw/branch/rocky-generic/scripts/expand-rootfs.service' --output /etc/systemd/system/expand-rootfs.service || exit 1
|
||||
[ -f /usr/local/bin/expand-rootfs.sh ] && \
|
||||
chmod --verbose +x /usr/local/bin/expand-rootfs.sh
|
||||
systemctl enable expand-rootfs.service
|
||||
|
||||
%end
|
||||
|
@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=Expand root filesystem
|
||||
|
||||
[Service]
|
||||
ExecStart=$(command -v bash) /usr/local/bin/expand-rootfs.sh
|
||||
Type=oneshot
|
||||
User=root
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
@ -18,12 +18,5 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
growpart "${PARENT_ROOT_DEVICE}" "${ROOT_PARTITION}" && GP_OK='true'
|
||||
resize2fs "${ROOT_DEVICE}" && RESIZE_OK='true'
|
||||
|
||||
if [[ "${GP_OK}" == 'true' && "${RESIZE_OK}" == 'true' ]]; then
|
||||
systemctl disable expand-rootfs.service
|
||||
rm /etc/systemd/system/expand-rootfs.service
|
||||
systemctl daemon-reload
|
||||
rm /usr/local/bin/expand-rootfs.sh
|
||||
fi
|
||||
growpart "${PARENT_ROOT_DEVICE}" "${ROOT_PARTITION}"
|
||||
resize2fs "${ROOT_DEVICE}"
|
||||
|
Loading…
Reference in New Issue
Block a user