diff options
author | Endi S. Dewata <edewata@redhat.com> | 2017-06-01 23:38:04 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2017-06-02 00:19:53 +0200 |
commit | 772e05e746570c13afeb60516c07a3fb95ca3e78 (patch) | |
tree | fa4c370d73bd9928c86c7e0ae94d9c6a40cbd02b | |
parent | 0beb742bdf25bab0eed0354729794013e1e7090e (diff) | |
download | pki-772e05e746570c13afeb60516c07a3fb95ca3e78.tar.gz pki-772e05e746570c13afeb60516c07a3fb95ca3e78.tar.xz pki-772e05e746570c13afeb60516c07a3fb95ca3e78.zip |
Removed superfluous deployment configuration backup.
The pkispawn has been modified to generate a temporary backup
file (instead of permanent and timestamped backup files) of the
deployment configuration file before normalizing its content.
The temporary backup will be removed automatically when the
normalization is complete.
https://pagure.io/dogtagpki/issue/2674
Change-Id: Ia541e23314acc120954fa574d1f6f885961c8047
-rwxr-xr-x | base/server/sbin/pkispawn | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/base/server/sbin/pkispawn b/base/server/sbin/pkispawn index 742f57961..1aa7079e8 100755 --- a/base/server/sbin/pkispawn +++ b/base/server/sbin/pkispawn @@ -34,8 +34,6 @@ try: import ldap import os import requests - import time - from time import strftime as date import traceback import pki from pki.server.deployment import pkiconfig as config @@ -610,12 +608,9 @@ def main(argv): def sanitize_user_deployment_cfg(cfg): - # Generate a timestamp - ticks = time.time() - timestamp = date('%Y%m%d%H%M%S', time.localtime(ticks)) # Correct any section headings in the user's configuration file - for line in fileinput.FileInput(cfg, inplace=1, backup='.' + timestamp): + for line in fileinput.FileInput(cfg, inplace=1): # Remove extraneous leading and trailing whitespace from all lines line = line.strip() # Normalize section headings to match '/etc/pki/default.cfg' |