1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

convert scripts to templates

This commit is contained in:
Jason N. 2024-03-04 17:52:59 -05:00
parent 4ad575e357
commit d7844183ea
3 changed files with 13 additions and 19 deletions

View file

@ -1,18 +0,0 @@
append usr/share/anaconda/interactive-defaults.ks "%post --erroronfail"
append usr/share/anaconda/interactive-defaults.ks "if (which bootc &> /dev/null)"
append usr/share/anaconda/interactive-defaults.ks "then"
append usr/share/anaconda/interactive-defaults.ks "bootc switch ${_IMAGE_REPO_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}"
append usr/share/anaconda/interactive-defaults.ks "else"
append usr/share/anaconda/interactive-defaults.ks "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${_IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin"
append usr/share/anaconda/interactive-defaults.ks "fi"
append usr/share/anaconda/interactive-defaults.ks "%end"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "%post --erroronfail"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "if (which bootc &> /dev/null)"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "then"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "bootc switch ${_IMAGE_REPO_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "else"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${_IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "fi"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "%end"

View file

@ -0,0 +1,6 @@
if (which bootc &> /dev/null)
then
bootc switch ${_IMAGE_REPO_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}
else
sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${_IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin
fi