diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-09-30 19:54:38 +0200 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-09-30 19:54:38 +0200 |
commit | 34a4e7151877c986dce294480c50c446b2a7c73a (patch) | |
tree | cd2ece0de95915b1e35b4c0d8b7d5241f049990f | |
parent | 86324ade28f499762725d2e3c8a3b3b5987dfe83 (diff) | |
download | nixos-34a4e7151877c986dce294480c50c446b2a7c73a.tar nixos-34a4e7151877c986dce294480c50c446b2a7c73a.tar.gz nixos-34a4e7151877c986dce294480c50c446b2a7c73a.tar.bz2 nixos-34a4e7151877c986dce294480c50c446b2a7c73a.tar.xz nixos-34a4e7151877c986dce294480c50c446b2a7c73a.zip |
ionice recv-media
-rw-r--r-- | hel/recv-media.nix | 3 |
1 files changed, 2 insertions, 1 deletions
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" '' | |||
14 | 14 | ||
15 | dir=/var/media | 15 | dir=/var/media |
16 | target="''${dir}"/$(basename "$1") | 16 | target="''${dir}"/$(basename "$1") |
17 | tmpFile=$(${coreutils}/bin/mktemp --dry-run --tmpdir=${dir} .recv-media.XXXXXXXXXX) | ||
17 | 18 | ||
18 | cp -vn --preserve=all "$1" "''${target}" | 19 | ${eject}/bin/ionice -c 3 -t cp -vn --preserve=all "$1" ${tmpFile} && mv ${tmpFile} "''${target}" |
19 | touch -c -m -t "$2" "''${target}" | 20 | touch -c -m -t "$2" "''${target}" |
20 | '' | 21 | '' |