Exemplo n.º 1
0
def _setup_eth(eth, bond):
    '''
    Setup the eth interface to be included in a bond.

    '''
    filename = "/etc/sysconfig/network-scripts/ifcfg-" + eth
    mac = general.get_config_value(filename, "HWADDR")
    general.store_file(filename,
"""DEVICE="%s"
HWADDR=%s
MASTER=%s
SLAVE=yes
NM_CONTROLLED="no"
ONBOOT=yes
USERCTL=no
HOTPLUG=no
BOOTPROTO=none
""" % (eth, mac, bond))
Exemplo n.º 2
0
def setup_eth(eth, bond):
    '''
    Setup the eth interface to be included in a bond.

    '''
    app.print_verbose(
        "Setup the eth interface {0} to be included in {1}.".format(eth, bond))
    filename = "/etc/sysconfig/network-scripts/ifcfg-" + eth
    mac = general.get_config_value(filename, "HWADDR")
    general.store_file(
        filename, """# Generated by syco
DEVICE="%s"
HWADDR=%s
MASTER=%s
SLAVE=yes
NM_CONTROLLED="no"
ONBOOT=yes
USERCTL=no
HOTPLUG=no
BOOTPROTO=none
""" % (eth, mac, bond))
Exemplo n.º 3
0
def setup_eth(eth, bond):
    '''
    Setup the eth interface to be included in a bond.

    '''
    app.print_verbose(
        "Setup the eth interface {0} to be included in {1}.".format(
            eth, bond
        )
    )
    filename = "/etc/sysconfig/network-scripts/ifcfg-" + eth
    mac = general.get_config_value(filename, "HWADDR")
    general.store_file(filename,
"""# Generated by syco
DEVICE="%s"
HWADDR=%s
MASTER=%s
SLAVE=yes
NM_CONTROLLED="no"
ONBOOT=yes
USERCTL=no
HOTPLUG=no
BOOTPROTO=none
""" % (eth, mac, bond))