Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Runge <dvzrv@archlinux.org>2021-05-29 10:47:24 +0200
committerDavid Runge <dvzrv@archlinux.org>2021-05-29 10:47:24 +0200
commitfa48377c8c3994b63657e03273e7f75c15bc10c9 (patch)
tree9887dbed475a63c0f204101b9afc1150ba914e91
parent3a5877d9f913d1151e8f729a46a7ecef643252b0 (diff)
parent756c9dbeb6d693158587ae6e0116156ef5aa1af6 (diff)
Merge remote-tracking branch 'sxw/copytoram'
* sxw/copytoram: Apply copytoram Boot Option Menu Entries also to releng Fence add_binary for pv Reorder UEFI boot menu entries Update README.bootparams Apply 1 suggestion(s) to 1 file(s) add optional pv tool
-rw-r--r--docs/README.bootparams4
-rw-r--r--hooks/archiso15
-rw-r--r--install/archiso6
3 files changed, 23 insertions, 2 deletions
diff --git a/docs/README.bootparams b/docs/README.bootparams
index bcafc0e..da1fcda 100644
--- a/docs/README.bootparams
+++ b/docs/README.bootparams
@@ -24,7 +24,9 @@ INDEX
* archisobasedir= Set the base directory where all files reside.
Default: "arch"
* copytoram= If set to "y" or just "copytoram" without arguments,
- all SquashFS are copied to "RAM".
+ all SquashFS are copied to "RAM". If you add the package
+ "pv" to the packages.x86_64 it is used to display the copy
+ progress.
Default: (unset)
* checksum= If set to "y" or just "checksum" without arguments,
performs a self-test of all files inside ${install_dir},
diff --git a/hooks/archiso b/hooks/archiso
index 1b848ce..d897ae1 100644
--- a/hooks/archiso
+++ b/hooks/archiso
@@ -69,10 +69,23 @@ _mnt_sfs() {
# defined via initcpio's parse_cmdline()
if [ "${copytoram}" = "y" ]; then
msg -n ":: Copying squashfs image to RAM..."
- if ! cp -- "${img}" "/run/archiso/copytoram/${img_fullname}" ; then
+
+ # in case we have pv use it to display copy progress feedback otherwise
+ # fallback to using plain cp
+ if command -v pv > /dev/null 2>&1; then
+ echo ""
+ (pv "${img}" > "/run/archiso/copytoram/${img_fullname}")
+ local rc=$?
+ else
+ (cp -- "${img}" "/run/archiso/copytoram/${img_fullname}")
+ local rc=$?
+ fi
+
+ if [ $rc != 0 ]; then
echo "ERROR: while copy '${img}' to '/run/archiso/copytoram/${img_fullname}'"
launch_interactive_shell
fi
+
img="/run/archiso/copytoram/${img_fullname}"
msg "done."
fi
diff --git a/install/archiso b/install/archiso
index 74948c7..c64e10e 100644
--- a/install/archiso
+++ b/install/archiso
@@ -19,6 +19,12 @@ build() {
add_binary gpg
add_binary grep
+ if command -v pv > /dev/null 2>&1; then
+ add_binary pv
+ else
+ warning 'pv not found; falling back to cp for copy to RAM'
+ fi
+
add_file /usr/lib/udev/rules.d/60-cdrom_id.rules
add_file /usr/lib/udev/rules.d/10-dm.rules
add_file /usr/lib/udev/rules.d/95-dm-notify.rules