Debian – Difference between /etc/init.d/networking restart and invoke-rc.d networking restart

debianinit-scriptinit.dservices

Is there any real difference between /etc/init.d/networking restart and invoke-rc.d networking restart (Debian)?

Best Answer

What invoke-rc.d does is documented in its man page. It is a wrapper around running the init script directly, but it also applies a policy that may cause the command not to be run, based on the current runlevel and whether the daemon should be run in that runlevel.

By default, Debian does not differentiate between runlevels 2-5, but as the local administrator, you can change what is run in each runlevel. invoke-rc.d will honor these local policies and not start a daemon if the runlevel is wrong.

Related Question