Yes generally any script that is marked as executable and placed in that folder is ran. The files do have are limited to a specific set of names because run-parts is used.
post-up does the same thing as using
up. Placing a script in the if-up.d is the same as simply using a
post-up that points to a script or command somewhere else. Usually you would use the up|post-up when you just needed to run a single command for a single interface. When you have something more complex you would create a script.
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.
run-parts runs all the executable files named within constraints
If the --lsbsysinit option is not given then the names must consist
entirely of upper and lower case letters, digits, underscores, and
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