/etc/network/if-up.d/ sous wheezy

A ta décharge, cette contrainte sur le shebang n’est pas documentée dans la page de manuel de run-parts. Je ne sais même plus comment je l’ai connue…

Normal. Regarde dans la page de manuel d’interfaces, des variables d’environnement sont passées en fonction des conditions d’appel du script, notamment :

IFACE physical name of the interface being processed LOGICAL logical name of the interface being processed ADDRFAM address family of the interface METHOD method of the interface (e.g., static) MODE start if run from ifup, stop if run from ifdown PHASE as per MODE, but with finer granularity, distinguishing the pre-up, post-up, pre-down and post-down phases.