diff --git a/stages/org.osbuild.dnf b/stages/org.osbuild.dnf index 4ef8e2c0..8fe6e0c1 100755 --- a/stages/org.osbuild.dnf +++ b/stages/org.osbuild.dnf @@ -1,5 +1,5 @@ #!/usr/bin/python3 - +import contextlib import hashlib import json import os @@ -129,6 +129,10 @@ def main(tree, options): machine_id_file.unlink() machine_id_file.touch() + # remove random seed from the tree if exists + with contextlib.suppress(FileNotFoundError): + os.unlink(f"{tree}/var/lib/systemd/random-seed") + return 0