mirror of
https://github.com/gaschz/dotfiles.git
synced 2025-06-06 18:08:31 +02:00
fix: remove unnecessary copy to dom0 loop
This commit is contained in:
parent
05f9a618a6
commit
c08e2fed76
@ -15,25 +15,15 @@ note: UPDATES_MAX_FILES (default: 2048)" >&2
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
main(){
|
|
||||||
file="${1}"
|
|
||||||
dir="${HOME}/QubesIncoming/${qube}"
|
|
||||||
user="$(qvm-prefs --get -- "${qube}" default_user)"
|
|
||||||
max_bytes="${UPDATES_MAX_BYTES:-4GiB}"
|
|
||||||
max_files="${UPDATES_MAX_FILES:-2048}"
|
|
||||||
qvm-run --pass-io --localcmd="
|
|
||||||
UPDATES_MAX_BYTES=\"${max_bytes}\" UPDATES_MAX_FILES=\"${max_files}\"
|
|
||||||
/usr/libexec/qubes/qfile-dom0-unpacker \"${user}\" \"${dir}\"" \
|
|
||||||
"${qube}" /usr/lib/qubes/qfile-agent "${file}"
|
|
||||||
}
|
|
||||||
|
|
||||||
test -n "${2-}" || usage
|
test -n "${2-}" || usage
|
||||||
qube="${1}"
|
qube="${1}"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
while true; do
|
dir="${HOME}/QubesIncoming/${qube}"
|
||||||
main "${1}"
|
user="$(qvm-prefs --get -- "${qube}" default_user)"
|
||||||
shift
|
max_bytes="${UPDATES_MAX_BYTES:-4GiB}"
|
||||||
test -z "${1-}" || continue
|
max_files="${UPDATES_MAX_FILES:-2048}"
|
||||||
break
|
qvm-run --pass-io --localcmd="
|
||||||
done
|
UPDATES_MAX_BYTES=\"${max_bytes}\" UPDATES_MAX_FILES=\"${max_files}\"
|
||||||
|
/usr/libexec/qubes/qfile-dom0-unpacker \"${user}\" \"${dir}\"" \
|
||||||
|
"${qube}" /usr/lib/qubes/qfile-agent "${@}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user