diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-04-06 17:36:08 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-04-06 17:36:08 +0200 |
| commit | 863aa163b5486afd69d78badb0ba2876f894b020 (patch) | |
| tree | b2d52eac5d307fc3dc31d8d526486e69c318ab6d /hel | |
| parent | caeddfa932de308a550adb62ba310813a1cd754f (diff) | |
| download | nixos-863aa163b5486afd69d78badb0ba2876f894b020.tar nixos-863aa163b5486afd69d78badb0ba2876f894b020.tar.gz nixos-863aa163b5486afd69d78badb0ba2876f894b020.tar.bz2 nixos-863aa163b5486afd69d78badb0ba2876f894b020.tar.xz nixos-863aa163b5486afd69d78badb0ba2876f894b020.zip | |
Debug recv-media
Diffstat (limited to 'hel')
| -rw-r--r-- | hel/recv-media.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix index a074e76b..7afd981d 100644 --- a/hel/recv-media.nix +++ b/hel/recv-media.nix | |||
| @@ -27,12 +27,19 @@ writeScriptBin "recv-media" '' | |||
| 27 | tmpFile="''${dir}"/.tmp/$(basename "$1") | 27 | tmpFile="''${dir}"/.tmp/$(basename "$1") |
| 28 | target="''${dir}"/$(basename "$1") | 28 | target="''${dir}"/$(basename "$1") |
| 29 | 29 | ||
| 30 | logger --id=$pid -t recv-media -p user.debug <<EOF | ||
| 31 | $(id) | ||
| 32 | $(stat ${dir}) | ||
| 33 | $(stat ${1}) | ||
| 34 | $(print ${2}) | ||
| 35 | EOF | ||
| 36 | |||
| 30 | if ! cp -lnv --preserve=all "$1" "''${target}"; then | 37 | if ! cp -lnv --preserve=all "$1" "''${target}"; then |
| 31 | mkdir -pv $(dirname "''${tmpFile}") | 38 | mkdir -pv $(dirname "''${tmpFile}") |
| 32 | 39 | ||
| 33 | ionice -c 3 -t cp -vn --preserve=all "$1" "''${tmpFile}" && mv -v "''${tmpFile}" "''${target}" | 40 | ionice -c 3 -t cp -vn --preserve=all "$1" "''${tmpFile}" && mv -v "''${tmpFile}" "''${target}" |
| 34 | touch -c -m -t "$2" "''${target}" | ||
| 35 | fi | 41 | fi |
| 42 | touch -c -m -t "$2" "''${target}" | ||
| 36 | 43 | ||
| 37 | ${if notifyUser == null then "" else "#"}exit 0 | 44 | ${if notifyUser == null then "" else "#"}exit 0 |
| 38 | 45 | ||
