-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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/systemd-boot: strip newline from machine-id #375298
Conversation
@@ -277,7 +277,7 @@ def get_profiles() -> list[str]: | |||
def install_bootloader(args: argparse.Namespace) -> None: | |||
try: | |||
with open("/etc/machine-id") as machine_file: | |||
machine_id = machine_file.readlines()[0] | |||
machine_id = machine_file.readlines()[0].strip() |
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.
Looks about right. Systemd will add a newline by default when it writes this file
and we do this:
f.write("machine-id %s\n" % machine_id)
@Mic92 is this PR good to go? |
@jmbaur have you run one of the systemd boot tests? I know the change is trivial but for bootloader script changes I am always extra careful. |
To make each line in the entry file consistent, strip the newline from the machine-id content.
ae30255
to
3de7bcc
Compare
@ofborg test systemd-boot.basic |
I should've done that awhile ago, thanks! Tested locally by building |
cc @NixOS/systemd |
To make each line in the entry file consistent, strip the newline from the machine-id content.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.