Skip to content

Commit

Permalink
CLONE.SH::CHANGED:: Get custom release names to correctly upgrade fstab
Browse files Browse the repository at this point in the history
  • Loading branch information
frikilax committed Aug 7, 2024
1 parent 408db42 commit 89a14cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usr/local/share/bastille/clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ update_fstab() {
# Update fstab to use the new name
FSTAB_CONFIG="${bastille_jailsdir}/${NEWNAME}/fstab"
if [ -f "${FSTAB_CONFIG}" ]; then
FSTAB_RELEASE=$(grep -owE '([1-9]{2,2})\.[0-9](-RELEASE|-RELEASE-i386|-RC[1-9]|-BETA[1-9]|-CURRENT)|([0-9]{1,2}(-stable-build-[0-9]{1,3}|-stable-LAST))|(current-build)-([0-9]{1,3})|(current-BUILD-LATEST)|([0-9]{1,2}-stable-BUILD-LATEST)' "${FSTAB_CONFIG}" | uniq)
FSTAB_RELEASE=$(grep -owE "${bastille_releasesdir}/(\S*)" "${FSTAB_CONFIG}" | uniq | rev | cut -d '/' -f -1 | rev)
FSTAB_CURRENT=$(grep -w ".*/releases/.*/jails/${TARGET}/root/.bastille" "${FSTAB_CONFIG}")
FSTAB_NEWCONF="${bastille_releasesdir}/${FSTAB_RELEASE} ${bastille_jailsdir}/${NEWNAME}/root/.bastille nullfs ro 0 0"
if [ -n "${FSTAB_CURRENT}" ] && [ -n "${FSTAB_NEWCONF}" ]; then
Expand Down

0 comments on commit 89a14cb

Please sign in to comment.