Install mkinitcpio-archiso-hooks in airootfs instead of copying the hooks from host

This commit is contained in:
nl6720 2020-07-29 19:23:58 +03:00
parent e9303ca175
commit b5f04dba2b
No known key found for this signature in database
GPG Key ID: 5CE88535E188D369
5 changed files with 8 additions and 16 deletions

View File

@ -112,6 +112,12 @@ To install archiso system-wide use the included **Makefile**:
make install
Optionally install archiso's mkinitcpio hooks:
.. code:: bash
make install-initcpio
License
=======

View File

@ -56,11 +56,6 @@ make_custom_airootfs() {
done < "${_airootfs}/etc/passwd"
fi
fi
mkdir -p -- "${work_dir}/airootfs/etc/initcpio/hooks"
mkdir -p -- "${work_dir}/airootfs/etc/initcpio/install"
cp /usr/lib/initcpio/hooks/archiso "${work_dir}/airootfs/etc/initcpio/hooks/"
cp /usr/lib/initcpio/install/archiso "${work_dir}/airootfs/etc/initcpio/install/"
}
# Packages (airootfs)

View File

@ -3,4 +3,5 @@
base
linux
mkinitcpio
mkinitcpio-archiso
syslinux

View File

@ -86,17 +86,6 @@ make_custom_airootfs() {
done < "${_airootfs}/etc/passwd"
fi
fi
local _hook
mkdir -p -- "${work_dir}/x86_64/airootfs/etc/initcpio/hooks"
mkdir -p -- "${work_dir}/x86_64/airootfs/etc/initcpio/install"
for _hook in archiso archiso_shutdown archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_loop_mnt; do
cp "/usr/lib/initcpio/hooks/${_hook}" "${work_dir}/x86_64/airootfs/etc/initcpio/hooks/"
cp "/usr/lib/initcpio/install/${_hook}" "${work_dir}/x86_64/airootfs/etc/initcpio/install/"
done
sed -i "s|/usr/lib/initcpio/|/etc/initcpio/|g" "${work_dir}/x86_64/airootfs/etc/initcpio/install/archiso_shutdown"
cp /usr/lib/initcpio/install/archiso_kms "${work_dir}/x86_64/airootfs/etc/initcpio/install/"
cp /usr/lib/initcpio/archiso_shutdown "${work_dir}/x86_64/airootfs/etc/initcpio/"
}
# Packages (airootfs)

View File

@ -48,6 +48,7 @@ mc
mdadm
memtest86+
mkinitcpio
mkinitcpio-archiso
mkinitcpio-nfs-utils
mtools
nano