Exemplo n.º 1
0
def setVirtDHCPSettings(update):
    """
    Takes a list of tuples (config, opts) and saves it to the dhcp config file.
    """
    changed = uciutils.setConfig(update.new, update.old,
                                 cacheKeys=['virtDHCPSettings'],
                                 filepath=uci.getSystemPath("dhcp"))
Exemplo n.º 2
0
def setOSFirewallRules(update):
    """
    Takes a list of tuples (config, opts) and saves it to the firewall config file.
    """
    changed = uciutils.setConfig(update.new, update.old,
                                 cacheKeys=['osFirewallRules', 'developerFirewallRules'],
                                 filepath=uci.getSystemPath("firewall"))
Exemplo n.º 3
0
def setOSNetworkConfig(update):
    """
    Takes a list of tuples (config, opts) and saves it to the network config
    file.
    """

    # Notes:
    #
    # Takes the config generated (cache:osNetworkConfig) and uses the UCI
    # module to actually push it to the disk
    #
    # old code under lib.internal.chs.chutelxc same function name

    changed = uciutils.setConfig(update.new, update.old,
                                 cacheKeys=['osNetworkConfig'],
                                 filepath=uci.getSystemPath("network"))
Exemplo n.º 4
0
def setOSWirelessConfig(update):
    # Basically the same as the networking version of this

    changed = uciutils.setConfig(update.new, update.old,
                                 cacheKeys=['osWirelessConfig'],
                                 filepath=uci.getSystemPath("wireless"))