Have a look at /etc/init.d/halt
. This file surely belongs in /etc/rc0.d
- and the only thing it defines is the stop
functionality (i.e. /etc/init.d/halt start
is a no-op). We can hence assume that scripts in /etc/rc0.d
are called with the stop
rather than start
argument.
Then having a look at /etc/init.d/networking
, we see:
stop) check_network_file_systems check_network_swap log_action_begin_msg "Deconfiguring network interfaces" if ifdown -a --exclude=lo $verbose; then log_action_end_msg $? else log_action_end_msg $? fi ;;
which first makes sure that no filesystems are mounted on the network anymore (which should be the case after umountnfs.sh
ran) and then disables networking (via ifdown
) to, for example, release DHCP leases or anything else sensibly one would want to do upon network deconfiguration.
To conclude, having a link to /etc/init.d/networking
in /etc/rc0.d
is perfectly fine.
(Note that I use Debian, but the scripts should essentially be the same.)
Furthermore, you should normally use update-rc.d
, which is able of enabling/disabling services, either for specific runlevels or in general, and ls
in order to see which services are enabled/disabled. I guess Ubuntu won’t switch to systemd any time soon, although one can apparently install it in Debian already, if one choses to do so.