From 50b2b4e56aa6f6dfaff61d7fcfa5da3ecad87167 Mon Sep 17 00:00:00 2001 From: David P Date: Tue, 6 Jul 2021 00:36:46 -0400 Subject: sync with archiso v55 Imported changes: 0bc6294 (tag: v55) Merge branch 'changelog/55' 5751de9 Add changelog for v55 50c5a02 Merge branch 'mr/118' d3b06a0 Add pv to the list of releng packages ef9207d Merge remote-tracking branch 'nl6720/baseline-erofs' 0b94b04 configs/baseline: use EROFS based image 85c7cbe Merge remote-tracking branch 'nl6720/networkd-replace-type-with-name' 3b2618f configs/releng/airootfs/etc/systemd/network/: match by globbing the interface name instead of matching the type 254194a Merge branch 'issues/135' 0e61ed0 Adjust documentation on IRC support channel e3a7f02 Merge remote-tracking branch 'sxw/copytoram' 31427ec Apply copytoram Boot Option Menu Entries also to releng 15f4ef4 Fence add_binary for pv 9c783a8 Reorder UEFI boot menu entries 16742d1 Update README.bootparams c9cdb6d Apply 1 suggestion(s) to 1 file(s) bb503b9 add optional pv tool Parabola changes: * mkparabolaiso: fix _run_once function Signed-off-by: David P --- parabolaiso/initcpio/hooks/parabolaiso | 15 ++++++++++++++- parabolaiso/initcpio/install/parabolaiso | 6 ++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'parabolaiso/initcpio') diff --git a/parabolaiso/initcpio/hooks/parabolaiso b/parabolaiso/initcpio/hooks/parabolaiso index 8f532c3..daac88b 100644 --- a/parabolaiso/initcpio/hooks/parabolaiso +++ b/parabolaiso/initcpio/hooks/parabolaiso @@ -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/parabolaiso/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/parabolaiso/copytoram/${img_fullname}") + local rc=$? + else + (cp -- "${img}" "/run/parabolaiso/copytoram/${img_fullname}") + local rc=$? + fi + + if [ $rc != 0 ]; then echo "ERROR: while copy '${img}' to '/run/parabolaiso/copytoram/${img_fullname}'" launch_interactive_shell fi + img="/run/parabolaiso/copytoram/${img_fullname}" msg "done." fi diff --git a/parabolaiso/initcpio/install/parabolaiso b/parabolaiso/initcpio/install/parabolaiso index 1e3b3b6..21af5b8 100644 --- a/parabolaiso/initcpio/install/parabolaiso +++ b/parabolaiso/initcpio/install/parabolaiso @@ -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 -- cgit v1.2.2