コード例 #1
0
ファイル: dhcp.py プロジェクト: SejalChauhan/Paradrop
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"))
コード例 #2
0
ファイル: firewall.py プロジェクト: SejalChauhan/Paradrop
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"))
コード例 #3
0
ファイル: network.py プロジェクト: SejalChauhan/Paradrop
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"))
コード例 #4
0
ファイル: wifi.py プロジェクト: SejalChauhan/Paradrop
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"))