Group :: Sistema/Configurações/Rede
RPM: sos
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: sos-tty-sysreport.diff
Download
Download
--- sos-1.7/sosreport
+++ sos-1.7/sosreport.new
@@ -176,4 +176,19 @@
dest="nomultithread", \
help="disable multi-threaded gathering mode (slower)", default=False)
+
+if sys.argv[0].endswith("sysreport"):
+ try:
+ ppid = os.getppid()
+ fp = open("/proc/%d/cmdline" % ppid, "r")
+ cmd = fp.read()
+ fp.close()
+ except:
+ cmd = ""
+ if not sys.stdin.isatty() or cmd.find("bash") < 0:
+ os.execl("/bin/sh", "/bin/sh", "-c", "/usr/sbin/sysreport.legacy")
+ os.exit(-1)
+ print "WARNING: sysreport is deprecated, please use sosreport instead."
+
(__cmdLineOpts__, __cmdLineArgs__)=__cmdParser__.parse_args()