Skip to content

Commit 3e1187f

Browse files
pogobananeMic92
authored andcommitted
nixos-remote-pxe: fix mkdir -p not setting permissions if folder already exists
1 parent c1ebc5f commit 3e1187f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nixos-anywhere.sh

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

0 commit comments

Comments
 (0)