Coding style plus élégant.
This commit is contained in:
parent
705f0099dc
commit
7ecf4b3e53
2 changed files with 2 additions and 6 deletions
|
@ -21,7 +21,5 @@ info["perms"] = 0644
|
||||||
|
|
||||||
include("arpwatch")
|
include("arpwatch")
|
||||||
for vlan in watched_vlans:
|
for vlan in watched_vlans:
|
||||||
iface = 'eth0'
|
iface = 'eth0.%d' % vlan
|
||||||
if vlan <> 1:
|
|
||||||
iface += '.%d' % vlan
|
|
||||||
print("%s -m root@crans.org" % iface)
|
print("%s -m root@crans.org" % iface)
|
||||||
|
|
|
@ -118,9 +118,7 @@ if has('arpwatch'):
|
||||||
# TODO modeliser ceci par un seul service pour éviter des races débiles
|
# TODO modeliser ceci par un seul service pour éviter des races débiles
|
||||||
# au moment des restart ...
|
# au moment des restart ...
|
||||||
for vlan in watched_vlans:
|
for vlan in watched_vlans:
|
||||||
iface = 'eth0'
|
iface = 'eth0.%d' % vlan
|
||||||
if vlan <> 1:
|
|
||||||
iface += '.%d' % vlan
|
|
||||||
service(None, name='arpwatch-%s' % iface,
|
service(None, name='arpwatch-%s' % iface,
|
||||||
init='arpwatch',
|
init='arpwatch',
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue