New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos-prepare-root: chmod if dir already exists, fixes #22413 #31071
Conversation
shift | ||
|
||
for dir in $@; do | ||
if [ -d "$dir" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Odd indentaton
mkdir -m 01777 -p $mountPoint/tmp | ||
mkdir -m 0755 -p $mountPoint/tmp/root | ||
mkdir -m 0755 -p $mountPoint/var | ||
mkdir -m 0700 -p $mountPoint/root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the install
command does both creating a directory and change permission in one shot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, install -d
does that.
186a0d1
to
2c9e195
Compare
Switched to |
we have |
Looks good to me if the tests pass 👍 |
NixOS installer tests pass. Thank you! |
Thanks! |
Motivation for this change
Fixes #22413. Please note that while I have tested the new
setupDir
function separately, I haven't testednixos-install
ornixos-prepare-root
, so testing is appreciated!Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)