diff --git a/usr/lib/archboot/release_functions b/usr/lib/archboot/release_functions index a87b284fd..c9c6dc7ea 100644 --- a/usr/lib/archboot/release_functions +++ b/usr/lib/archboot/release_functions @@ -5,9 +5,11 @@ _AMD_UCODE="boot/amd-ucode.img" _INTEL_UCODE="boot/intel-ucode.img" _INITRAMFS="boot/initramfs_${_ARCH}.img" _INITRAMFS_LATEST="boot/initramfs_${_ARCH}-latest.img" +_INITRAMFS_LOCAL="boot/initramfs_${_ARCH}-local.img" _KERNEL="boot/vmlinuz_${_ARCH}" _KERNEL_ARCHBOOT="boot/vmlinuz_archboot_${_ARCH}" _PRESET_LATEST="${_ARCH}-latest" +_PRESET_LOCAL="${_ARCH}-local" _W_DIR="$(mktemp -u archboot-release.XXX)" _usage () { @@ -36,6 +38,10 @@ _create_iso() { # generate latest iso in container systemd-nspawn -q -D "${_W_DIR}" /bin/bash -c "umount /tmp;archboot-${_ARCH}-iso.sh -g -p=${_PRESET_LATEST} \ -i=archlinux-archboot-$(date +%Y.%m.%d-%H.%M)-latest-${_ARCH}" || exit 1 + echo "Generate local ISO ..." + # generate local iso in container + systemd-nspawn -q -D "${_W_DIR}" /bin/bash -c "umount /tmp;archboot-${_ARCH}-iso.sh -g -p=${_PRESET_LOCAL} \ + -i=archlinux-archboot-$(date +%Y.%m.%d-%H.%M)-local-${_ARCH}" || exit 1 # create Release.txt with included main archlinux packages echo "Generate Release.txt ..." (echo "Welcome to ARCHBOOT INSTALLATION / RESCUEBOOT SYSTEM";\ @@ -60,13 +66,15 @@ _create_boot() { mkdir -p boot/licenses/amd-ucode [[ "${_ARCH}" == "aarch64" ]] || mkdir -p boot/licenses/intel-ucode for i in *.iso; do - if ! echo "${i}" | grep -q latest; then + if echo "${i}" | grep -v local | grep -vq latest; then isoinfo -R -i "${i}" -x /"${_AMD_UCODE}" 2>/dev/null > "${_AMD_UCODE}" [[ "${_ARCH}" == "aarch64" ]] || isoinfo -R -i "${i}" -x /"${_INTEL_UCODE}" 2>/dev/null > "${_INTEL_UCODE}" isoinfo -R -i "${i}" -x /"${_INITRAMFS}" 2>/dev/null > "${_INITRAMFS}" isoinfo -R -i "${i}" -x /"${_KERNEL}" 2>/dev/null > "${_KERNEL_ARCHBOOT}" - else + elif echo "${i}" | grep -q latest; then isoinfo -R -i "${i}" -x /"${_INITRAMFS}" 2>/dev/null > "${_INITRAMFS_LATEST}" + elif echo "${i}" | grep -q local; then + isoinfo -R -i "${i}" -x /"${_INITRAMFS}" 2>/dev/null > "${_INITRAMFS_LOCAL}" fi done cp /usr/share/licenses/amd-ucode/* boot/licenses/amd-ucode/