Sí, generalmente se ejecuta cualquier script marcado como ejecutable y colocado en esa carpeta. Los archivos que tienen están limitados a un conjunto específico de nombres porque se usan partes de ejecución.
El post-up
hace lo mismo que el uso up
. Colocar un script en if-up.d es lo mismo que simplemente usar un post-up
que apunta a un script o comando en otro lugar. Por lo general, utilizaría el up | post-up cuando solo necesitara ejecutar un solo comando para una única interfaz. Cuando tienes algo más complejo, creas un script.
interfaces hombre
...
up command
post-up command
Run command after bringing the interface up. If this command
fails then ifup aborts, refraining from marking the interface as
configured (even though it has really been configured), prints
an error message, and exits with status 0. This behavior may
change in the future.
...
There exists for each of the above mentioned options a directory
/etc/network/if-<option>.d/ the scripts in which are run (with no argu-
ments) using run-parts(8) after the option itself has been processed.
hombre run-parts
run-parts runs all the executable files named within constraints
described below,
If the --lsbsysinit option is not given then the names must consist
entirely of upper and lower case letters, digits, underscores, and
hyphens.
...
Files are run in the lexical sort order of their names unless the
--reverse option is given, in which case they are run in the opposite
order.