Coding style plus élégant.

This commit is contained in:
Pierre-Elliott Bécue 2014-10-15 00:19:17 +02:00
parent 705f0099dc
commit 7ecf4b3e53
2 changed files with 2 additions and 6 deletions

View file

@ -21,7 +21,5 @@ info["perms"] = 0644
include("arpwatch")
for vlan in watched_vlans:
iface = 'eth0'
if vlan <> 1:
iface += '.%d' % vlan
iface = 'eth0.%d' % vlan
print("%s -m root@crans.org" % iface)

View file

@ -118,9 +118,7 @@ if has('arpwatch'):
# TODO modeliser ceci par un seul service pour éviter des races débiles
# au moment des restart ...
for vlan in watched_vlans:
iface = 'eth0'
if vlan <> 1:
iface += '.%d' % vlan
iface = 'eth0.%d' % vlan
service(None, name='arpwatch-%s' % iface,
init='arpwatch',
)