View | Details | Raw Unified | Return to bug 201767
Collapse All | Expand All

(-)check_smartmon (-5 / +5 lines)
Lines 59-65 def parseCmdLine(args): Link Here
59
                        metavar="LEVEL", help="set verbosity level to LEVEL; defaults to 0 (quiet), \
59
                        metavar="LEVEL", help="set verbosity level to LEVEL; defaults to 0 (quiet), \
60
                                        possible values go up to 3")
60
                                        possible values go up to 3")
61
        parser.add_option("-t", "--type", action="store", dest="devtype", default="ata", metavar="DEVTYPE",
61
        parser.add_option("-t", "--type", action="store", dest="devtype", default="ata", metavar="DEVTYPE",
62
                        help="type of device (ATA|SCSI)")
62
                        help="type of device (ata|scsi)")
63
        parser.add_option("-w", "--warning-threshold", metavar="TEMP", action="store",
63
        parser.add_option("-w", "--warning-threshold", metavar="TEMP", action="store",
64
                        type="int", dest="warningThreshold", default=55,
64
                        type="int", dest="warningThreshold", default=55,
65
                        help="set temperature warning threshold to given temperature (defaults to 55)")
65
                        help="set temperature warning threshold to given temperature (defaults to 55)")
Lines 291-300 if __name__ == "__main__": Link Here
291
        vprint(2, "Get device type")
291
        vprint(2, "Get device type")
292
        devtype = options.devtype
292
        devtype = options.devtype
293
        if not devtype:
293
        if not devtype:
294
                devtype = "ATA"
294
                if device_re.search( device ):
295
295
                        devtype = "scsi"
296
        if device_re.search( device ):
296
                else:
297
                devtype = "scsi"
297
                        devtype = "ata"
298
298
299
        vprint(1, "Device type: %s" % devtype)
299
        vprint(1, "Device type: %s" % devtype)
300
300

Return to bug 201767