#593643 ifupdown: ifdown -a : doesn't call script in if-post-down.d for vlans

Package:
ifupdown
Source:
ifupdown
Description:
high level tools to configure network interfaces
Submitter:
Guillaume Thirion
Date:
2010-08-19 20:00:05 UTC
Severity:
normal
#593643#5
Date:
2010-08-15 08:04:37 UTC
From:
To:
Hi,

I've 2 material interface eth0 and eth1.
On eth1 i've 2 vlans : eth1.20 and eth.100

When i call ifdown -a, the script /etc/network/if-post-down.d/vlan is not called that mean vlans are not destroy.
When i call ifup -a after that i've got some error message, because the script /etc/network/if-pre-up.d/vlan try to create them.

To done this simplier : /etc/init.d/networking restart

[...]
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
ERROR: trying to add VLAN #20 to IF -:eth1:-  error: File exists
if-up.d/mountnfs[eth1.20]: waiting for interface eth1.100 before doing NFS mounts (warning).
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config
ERROR: trying to add VLAN #100 to IF -:eth1:-  error: File exists
[...]

To debug i've put some echo in top of each script : echo "Script call with interface : $IFACE"
It appear : the post-down vlan's script is call only with eth0 and eth1 but the pre-up vlan's script is called with all interfaces.

-+-+-+-+-+-+-+-+-+-+-+-+
/etc/network/interfaces to reproduce :

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp

auto eth1 eth1.20 eth1.100
iface eth1 inet static
	address 192.168.254.1
	netmask 255.255.255.0
	network 192.168.254.0
	broadcast 192.168.254.255

iface eth1.20 inet static
	address 192.168.1.254
	netmask 255.255.255.0
	gateway 192.168.1.1
	network 192.168.1.0
	broadcast 192.168.1.255
	vlan_raw_device eth1

iface eth1.100 inet static
	address 192.168.4.1
	netmask 255.255.255.0
	gateway 192.168.4.254
	network 192.168.4.0
	broadcast 192.168.4.255
	vlan_raw_device eth1

-+-+-+-+-+-+-+-+-+-+-+-+

I've also try to add post-down command in my interfaces's file, but no more result.

Thanks in advance
Guillaume