diff --git a/initcpio/hooks/miso b/initcpio/hooks/miso index 4172e6e..1703b96 100644 --- a/initcpio/hooks/miso +++ b/initcpio/hooks/miso @@ -100,7 +100,7 @@ _mnt_dev() { _verify_checksum() { local _status - cd "/run/archiso/bootmnt/${misobasedir}/${arch}" + cd "/run/miso/bootmnt/${misobasedir}/${arch}" md5sum -c $1.md5 > /tmp/checksum.log 2>&1 _status=$? cd "${OLDPWD}" @@ -109,7 +109,7 @@ _verify_checksum() { _verify_signature() { local _status - cd "/run/archiso/bootmnt/${misobasedir}/${arch}" + cd "/run/miso/bootmnt/${misobasedir}/${arch}" gpg --homedir /gpg --status-fd 1 --verify $1.sfs.sig 2>/dev/null | grep -qE '^\[GNUPG:\] GOODSIG' _status=$? cd "${OLDPWD}" @@ -177,7 +177,7 @@ miso_mount_handler() { for fs in rootfs desktopfs mhwdfs livefs;do if [[ -f "/run/miso/bootmnt/${misobasedir}/${arch}/${fs}.sfs.sig" ]]; then msg -n ":: Signature verification requested, please wait..." - if _verify_signature; then + if _verify_signature "${fs}"; then msg "done. Signature is OK, continue booting." else echo "ERROR: one or more files are corrupted" diff --git a/initcpio/hooks/miso_aufs b/initcpio/hooks/miso_aufs index 9fa3a1f..408b5c8 100644 --- a/initcpio/hooks/miso_aufs +++ b/initcpio/hooks/miso_aufs @@ -100,7 +100,7 @@ _mnt_dev() { _verify_checksum() { local _status cd "/run/miso/bootmnt/${misobasedir}/${arch}" - md5sum -c airootfs.md5 > /tmp/checksum.log 2>&1 + md5sum -c $1.md5 > /tmp/checksum.log 2>&1 _status=$? cd "${OLDPWD}" return ${_status} @@ -109,7 +109,7 @@ _verify_checksum() { _verify_signature() { local _status cd "/run/miso/bootmnt/${misobasedir}/${arch}" - gpg --homedir /gpg --status-fd 1 --verify airootfs.sfs.sig 2>/dev/null | grep -qE '^\[GNUPG:\] GOODSIG' + gpg --homedir /gpg --status-fd 1 --verify $1.sfs.sig 2>/dev/null | grep -qE '^\[GNUPG:\] GOODSIG' _status=$? cd "${OLDPWD}" return ${_status} @@ -175,7 +175,7 @@ miso_mount_handler() { for fs in rootfs desktopfs mhwdfs livefs;do if [[ -f "/run/miso/bootmnt/${misobasedir}/${arch}/${fs}.sfs.sig" ]]; then msg -n ":: Signature verification requested, please wait..." - if _verify_signature; then + if _verify_signature "${fs}"; then msg "done. Signature is OK, continue booting." else echo "ERROR: one or more files are corrupted" diff --git a/initcpio/hooks/miso_pxe_http b/initcpio/hooks/miso_pxe_http index cdad2e8..98f97ff 100644 --- a/initcpio/hooks/miso_pxe_http +++ b/initcpio/hooks/miso_pxe_http @@ -34,15 +34,20 @@ miso_pxe_http_mount_handler () { mkdir -p "/run/miso/httpspace" mount -t tmpfs -o size="${miso_http_spc}",mode=0755 httpspace "/run/miso/httpspace" - _curl_get "${miso_http_srv}${misobasedir}/${arch}/airootfs.sfs" "/${arch}" + local _src=${miso_http_srv}${misobasedir}/${arch} - if [[ "${checksum}" == "y" ]]; then - _curl_get "${miso_http_srv}${misobasedir}/${arch}/airootfs.md5" "/${arch}" - fi - if [[ "${verify}" == "y" ]]; then - _curl_get "${miso_http_srv}${misobasedir}/${arch}/airootfs.sfs.sig" "/${arch}" - fi + for sfs in livefs mhwdfs desktopfs rootfs;do + if [[ -f "${_src}/${sfs}.sfs" ]]; then + _curl_get "${_src}/${sfs}.sfs" "/${arch}" + if [[ "${checksum}" == "y" ]]; then + _curl_get "${_src}/${sfs}.md5" "/${arch}" + fi + if [[ "${verify}" == "y" ]]; then + _curl_get "${_src}/${sfs}.sfs.sig" "/${arch}" + fi + fi + done mkdir -p "/run/miso/bootmnt" mount -o bind /run/miso/httpspace /run/miso/bootmnt