예제 #1
0
파일: udev.py 프로젝트: fabiand/blivet
def udev_trigger(subsystem=None, action="add", name=None):
    argv = ["trigger", "--action=%s" % action]
    if subsystem:
        argv.append("--subsystem-match=%s" % subsystem)
    if name:
        argv.append("--sysname-match=%s" % name)

    util.run_program(["udevadm"] + argv)
    udev_settle()
예제 #2
0
def run_rates(command):
    global _tiger_binary
    if _tiger_binary is None:
        _tiger_binary = util.find_program(_binary_name)

    try:
        util.run_program(_tiger_binary, command)
    except util.ExternalProgramError:
        log.error("fast_TIGER did not execute successfully")
        log.error("fast_TIGER output follows, in case it's helpful for \
            finding the problem")
        log.error("You probably just need to recompile the fast_TIGER \
            code for your system. But please note that this is an \
            unsupported option. For empirical work we recommend using \
            entropy calculations for site rates, which is the default \
            behaviour for the kmeans algorithm in PF2.")
        raise
예제 #3
0
def run_raxml_pthreads(command, cpus):
    global _raxml_pthreads_binary
    if _raxml_pthreads_binary is None:
        _raxml_pthreads_binary = util.find_program(_binary_name_pthreads)
    command = " ".join([command, "-T", str(cpus), " "])
    util.run_program(_raxml_pthreads_binary, command)
예제 #4
0
def run_raxml(command):
    global _raxml_binary
    if _raxml_binary is None:
        _raxml_binary = util.find_program(_binary_name)
    util.run_program(_raxml_binary, command)
예제 #5
0
def run_raxml_pthreads(command, cpus):
    global _raxml_pthreads_binary
    if _raxml_pthreads_binary is None:
        _raxml_pthreads_binary = util.find_program(_binary_name_pthreads)
    command = " ".join([command, "-T", str(cpus), " "])
    util.run_program(_raxml_pthreads_binary, command)
예제 #6
0
def run_raxml(command):
    global _raxml_binary
    if _raxml_binary is None:
        _raxml_binary = util.find_program(_binary_name)
    util.run_program(_raxml_binary, command)
예제 #7
0
파일: udev.py 프로젝트: fabiand/blivet
def udev_settle():
    # wait maximal 300 seconds for udev to be done running blkid, lvm,
    # mdadm etc. This large timeout is needed when running on machines with
    # lots of disks, or with slow disks
    util.run_program(["udevadm", "settle", "--timeout=300"])