@clint,
I think there is an issue with the branch you've been working on when mappings are used.
I've fixed my branch to use the first token of /var/run/network/ifstate rather than the second. Experimentation showed that the first field will be the physical interface and the second would be the virtual. 'auto' lines in interfaces reference virtual.
That would seem to be fine, but my issue right now is that 'ifquery --list' does not show any interfaces that have had mappings done. Sadly:
$ sudo ifquery --list
lo
Ignoring unknown interface eth0=eth0.
The 'Ignoring' message goes to stderr.
The issue, is that with the current implementation, the 'static-network-up' would fire as soon as 'lo' was up. Because the 'ifquery --list' is not providing a complete list to stdout as expected.
@clint, network/ ifstate rather than the second. Experimentation showed that the first field will be the physical interface and the second would be the virtual. 'auto' lines in interfaces reference virtual.
I think there is an issue with the branch you've been working on when mappings are used.
I've fixed my branch to use the first token of /var/run/
That would seem to be fine, but my issue right now is that 'ifquery --list' does not show any interfaces that have had mappings done. Sadly:
$ cat /etc/network/ interfaces bin/print- last
auto eth0
mapping eth0
script /usr/local/
map AUTO xdhcp
map MANUAL xmanual
iface xdhcp inet dhcp
iface xmanual inet static
address 192.168.42.1
netmask 255.255.255.0
$ cat /usr/local/ bin/print- last
#!/bin/sh
while read name val; do last=$val; done
echo $last
$ sudo ifquery --list
lo
Ignoring unknown interface eth0=eth0.
$ sudo ifup eth0 network/ ifstate
$ cat /var/run/
lo=lo
eth0=xmanual
$ sudo ifquery --list
lo
Ignoring unknown interface eth0=eth0.
The 'Ignoring' message goes to stderr.
The issue, is that with the current implementation, the 'static-network-up' would fire as soon as 'lo' was up. Because the 'ifquery --list' is not providing a complete list to stdout as expected.