diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-12-16 23:15:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-16 23:15:04 +0100 |
commit | fb0091f0947e206845b226f03f99f7a1d9dbb407 (patch) | |
tree | 2c881b36ba40170dc62889f63ceb1198b44c7340 /pkgs | |
parent | 7acf783486d00b16cb330f00814e656a557a87ee (diff) | |
parent | e6ca3fc97641974be0810fbbba1ca1cc7b4d5396 (diff) |
Merge pull request #150975 from NixOS/revert-150065-workaround-issue-144811
Revert "nixos-rebuild: switch to tmpDir during rebuilds"
Diffstat (limited to 'pkgs')
-rwxr-xr-x | pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index 7f6d6ce22827b..e5e40dca086ed 100755 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -362,16 +362,14 @@ if [ "$action" = edit ]; then exit 1 fi -ORIGIN_PWD="$PWD" + tmpDir=$(mktemp -t -d nixos-rebuild.XXXXXX) SSHOPTS="$NIX_SSHOPTS -o ControlMaster=auto -o ControlPath=$tmpDir/ssh-%n -o ControlPersist=60" -cd "$tmpDir" cleanup() { for ctrl in "$tmpDir"/ssh-*; do ssh -o ControlPath="$ctrl" -O exit dummyhost 2>/dev/null || true done - cd "$ORIGIN_PWD" rm -rf "$tmpDir" } trap cleanup EXIT |