diff options
-rw-r--r-- | man/en/sosreport.1 | 7 | ||||
-rwxr-xr-x | sos/policyredhat.py | 10 | ||||
-rwxr-xr-x | sos/sosreport.py | 3 |
3 files changed, 7 insertions, 13 deletions
diff --git a/man/en/sosreport.1 b/man/en/sosreport.1 index ea4a5f04..4729762e 100644 --- a/man/en/sosreport.1 +++ b/man/en/sosreport.1 @@ -13,7 +13,7 @@ sosreport \- Generate debugging information for this system [--build] [--name name] [--no-colors]\fR [--ticket-number number] [--debug]\fR [--upload] [--tmp-dir directory]\fR - [--dst-dir directory] [--profile] [--help]\fR + [--profile] [--help]\fR .SH DESCRIPTION \fBsosreport\fR generates a compressed tarball of debugging information for the system it is run on that can be sent to technical support @@ -60,10 +60,7 @@ Enable html/xml report writing Specify alternate configuration file .TP .B \--tmp-dir DIRECTORY -Specify alternate temporary directory to copy data -.TP -.B \--dst-dir DIRECTORY -Specify alternate directory to store compressed report +Specify alternate temporary directory to copy data as well as the compressed report. .TP .B \--batch Perform data gathering unattended diff --git a/sos/policyredhat.py b/sos/policyredhat.py index c1165f6a..345e0616 100755 --- a/sos/policyredhat.py +++ b/sos/policyredhat.py @@ -191,7 +191,7 @@ class SosPolicy: and reports. """ uniqname = "%s-%s" % (self.hostName(), time.strftime("%Y%m%d%H%M%s")) - dstroot = os.path.join(tmpdir,uniqname) + dstroot = os.path.join(dir,uniqname) try: os.mkdir(dstroot, 0700) except: @@ -230,7 +230,7 @@ class SosPolicy: return def renameResults(self, newName): - newName = os.path.join(gettempdir(), newName) + newName = os.path.join(os.path.dirname(self.cInfo['dstroot']), newName) if len(self.report_file) and os.path.isfile(self.report_file): try: os.rename(self.report_file, newName) @@ -313,9 +313,9 @@ class SosPolicy: fp.close() self.renameResults("sosreport-%s-%s-%s.%s" % (self.reportName, - time.strftime("%Y%m%d%H%M%S"), - self.report_md5[-4:], - self.report_file_ext)) + time.strftime("%Y%m%d%H%M%S"), + self.report_md5[-4:], + self.report_file_ext)) # store md5 into file fp = open(self.report_file + ".md5", "w") diff --git a/sos/sosreport.py b/sos/sosreport.py index 6b236e3b..3e0599fc 100755 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -186,9 +186,6 @@ def parse_options(opts): __cmdParser__.add_option("--tmp-dir", action="store", \ dest="tmp_dir", \ help="specify alternate temporary directory", default="/tmp") - __cmdParser__.add_option("--dst-dir", action="store", \ - dest="dst_dir", \ - help="specify alternate directory to store compressed report", default="/tmp") __cmdParser__.add_option("--diagnose", action="store_true", \ dest="diagnose", \ help="enable diagnostics", default=False) |