Bug#945492: ifup/ifdown --all causes hooks to be called not per interface, but once with IFACE==--all

2020-04-26 Thread Guus Sliepen
severity 945492 wishlist
thanks

On Tue, Nov 26, 2019 at 11:16:56AM +1300, martin f krafft wrote:

> root@lotus:/etc/network/if-pre-up.d# ifup -a
> IFACE==--all
> run-parts: /etc/network/if-pre-up.d/000debug exited with return code 1
> ifup: pre-up script failed
> 
> Arguably, the hooks should be called once for each interface that is 
> brought up/down, with $IFACE set accordingly, not just once for all 
> of them.

It is called for all of them with $IFACE set accordingly, but in
addition, for each invocation of ifup -a, the scripts are run with
IFACE=--all.

This is documented behaviour, and some users' setups might depend on it.
I'll have to check whether this is still used by scripts provided by
other Debian packages, and if not then perhaps we can phase this out.

-- 
Met vriendelijke groet / with kind regards,
  Guus Sliepen 


signature.asc
Description: PGP signature


Bug#945492: ifup/ifdown --all causes hooks to be called not per interface, but once with IFACE==--all

2019-11-25 Thread martin f krafft
Package: ifupdown
Version: 0.8.35+b1
Severity: important

root@lotus:/etc/network/if-pre-up.d# cat <<_eof > 000debug
#!/bin/sh
echo IFACE==$IFACE
exit 1
_eof

root@lotus:/etc/network/if-pre-up.d# chmod +x 000debug

root@lotus:/etc/network/if-pre-up.d# ifup -a
IFACE==--all
run-parts: /etc/network/if-pre-up.d/000debug exited with return code 1
ifup: pre-up script failed



Arguably, the hooks should be called once for each interface that is 
brought up/down, with $IFACE set accordingly, not just once for all 
of them.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.0-2-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8), LANGUAGE=en_NZ:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ifupdown depends on:
ii  adduser   3.118
ii  iproute2  5.3.0-1
ii  libc6 2.29-3
ii  lsb-base  11.1.0

Versions of packages ifupdown recommends:
ii  isc-dhcp-client [dhcp-client]  4.4.1-2

Versions of packages ifupdown suggests:
pn  ppp 
pn  rdnssd  

-- no debconf information


-- 
 .''`.   martin f. krafft  @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems


digital_signature_gpg.asc
Description: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)