Skip to content
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

Do not warn in case of existing cert file r9 #6144

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dracut/parse-kickstart
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def _dump_certificate(cert, root="/", dump_dir=None):
dst = os.path.join(dst_dir, cert.filename)

if os.path.exists(dst):
log.warning("Certificate file %s already exists, replacing.", dst)
log.info("Certificate file %s already exists, replacing.", dst)

with open(dst, 'w') as f:
f.write(cert.cert)
Expand All @@ -423,6 +423,10 @@ def _dump_certificate(cert, root="/", dump_dir=None):

def process_certificates(handler):
"""Import certificates defined in %certificate sections."""
# NOTE: parse-kickstart can be run multiple times so either the processing
# needs to be idempotent (like dumping the files), or guarded to happen
# only once, or the certificates dumped during parsing should be imported
# once in a initqueue hook.
for cert in handler.certificates:
log.info("Processing kickstart certificate %s", cert.filename)

Expand Down
2 changes: 1 addition & 1 deletion pyanaconda/modules/security/certificates/installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _dump_certificate(self, cert, root):
dst = join_paths(dst_dir, cert.filename)

if os.path.exists(dst):
log.warning("Certificate file %s already exists, replacing.", dst)
log.info("Certificate file %s already exists, replacing.", dst)

with open(dst, 'w') as f:
f.write(cert.cert)
Expand Down
Loading