diff options
Diffstat (limited to 'src/conf-mode/vyos-config-bcast-relay.py')
-rwxr-xr-x | src/conf-mode/vyos-config-bcast-relay.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conf-mode/vyos-config-bcast-relay.py b/src/conf-mode/vyos-config-bcast-relay.py index 3107dce43..785690d9c 100755 --- a/src/conf-mode/vyos-config-bcast-relay.py +++ b/src/conf-mode/vyos-config-bcast-relay.py @@ -23,7 +23,7 @@ import time import subprocess from vyos.config import Config -from vyos.util import ConfigError +from vyos import ConfigError config_file = r'/etc/default/udp-broadcast-relay' @@ -41,9 +41,9 @@ def get_config(): # split the interface name listing and form a list if conf.exists("{0} interface".format(id)): + intfs_names = [] intfs_names = conf.return_values("{0} interface".format(id)) - intfs_names=intfs_names.replace("'", "") - intfs_names=intfs_names.split() + for name in intfs_names: interface_list.append(name) @@ -90,7 +90,7 @@ def generate(relays): for relay in relays: file = config_file + str(relay["id"]) interfaces = ' '.join(str(intf) for intf in relay["interfaces"]) - config_args = 'DAEMON_ARGS="{0} {1} {2}"\n'.format(relay["id"], relay["port"], interfaces) + config_args = 'DAEMON_ARGS="{0} {1}"\n'.format(relay["port"], interfaces) f = open(file, 'w') f.write(config_header) |