From 34a4e7151877c986dce294480c50c446b2a7c73a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 30 Sep 2016 19:54:38 +0200 Subject: ionice recv-media --- hel/recv-media.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hel/recv-media.nix b/hel/recv-media.nix index 488f0cca..7f79d65a 100644 --- a/hel/recv-media.nix +++ b/hel/recv-media.nix @@ -14,7 +14,8 @@ writeScriptBin "recv-media" '' dir=/var/media target="''${dir}"/$(basename "$1") + tmpFile=$(${coreutils}/bin/mktemp --dry-run --tmpdir=${dir} .recv-media.XXXXXXXXXX) - cp -vn --preserve=all "$1" "''${target}" + ${eject}/bin/ionice -c 3 -t cp -vn --preserve=all "$1" ${tmpFile} && mv ${tmpFile} "''${target}" touch -c -m -t "$2" "''${target}" '' -- cgit v1.2.3