nixos/systemd-boot: strip newline from machine-id

To make each line in the entry file consistent, strip the newline from
the machine-id content.
This commit is contained in:
Jared Baur
2025-01-20 02:18:03 -08:00
parent fc04e24292
commit 3de7bccd4a

View File

@@ -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()
except IOError as e:
if e.errno != errno.ENOENT:
raise