index : mkinitcpio-archiso32 | |
Archlinux32 initcpio scripts used by archiso | gitolite user |
summaryrefslogtreecommitdiff |
author | nl6720 <nl6720@gmail.com> | 2020-10-24 15:53:57 +0300 |
---|---|---|
committer | nl6720 <nl6720@gmail.com> | 2021-03-09 16:25:45 +0200 |
commit | 1bfadf3e6451efbb36d7fd266810cb1e38e8811e (patch) | |
tree | b6063ec28048688a55fd390615f384de288a2687 /hooks/archiso_pxe_http | |
parent | d13c747c67a140362a463e186fcdc900a42c840f (diff) |
-rw-r--r-- | hooks/archiso_pxe_http | 10 |
diff --git a/hooks/archiso_pxe_http b/hooks/archiso_pxe_http index efae923..43b8b4b 100644 --- a/hooks/archiso_pxe_http +++ b/hooks/archiso_pxe_http @@ -39,6 +39,7 @@ _curl_get() { archiso_pxe_http_mount_handler () { newroot="${1}" + local img_type="sfs" msg ":: Mounting /run/archiso/httpspace (tmpfs) filesystem, size='${archiso_http_spc}'" mkdir -p "/run/archiso/httpspace" @@ -46,7 +47,12 @@ archiso_pxe_http_mount_handler () { # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() - _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs" "/${arch}" + if ! curl -L -f -o /dev/null -s -r 0-0 "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs"; then + if curl -L -f -o /dev/null -s -r 0-0 "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.erofs"; then + img_type="erofs" + fi + fi + _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.${img_type}" "/${arch}" # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() @@ -56,7 +62,7 @@ archiso_pxe_http_mount_handler () { # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() if [ "${verify}" = "y" ]; then - _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs.sig" "/${arch}" + _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.${img_type}.sig" "/${arch}" fi mkdir -p "/run/archiso/bootmnt" |