Skip to content

Commit 0633858

Browse files
committed
nixos-remote-pxe: fix mkdir -p not setting permissions if folder already exists
1 parent ba6cdfe commit 0633858

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nixos-remote.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ fi
324324
ssh_ <<SSH
325325
set -efu ${enable_debug}
326326
# needed for installation if initrd-secrets are used
327-
mkdir -m777 -p /mnt/tmp
327+
mkdir -p /mnt/tmp
328+
chmod 777 /mnt/tmp
328329
nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system"
329330
# We will reboot in background so we can cleanly finish the script before the hosts go down.
330331
# This makes integration into scripts easier

0 commit comments

Comments
 (0)