/etc/rc.d vs /etc/init.d
Ubuntu uses /etc/init.d
to store SysVinit scripts because Ubuntu is based on Debian and that's what Debian uses. Red Hat uses /etc/rc.d/init.d
. I forget what Slackware uses. There just isn't a standard location.
Ubuntu briefly switched from SysVinit to Upstart, but has now turned to using systemd
.
/etc/init.d was the old historical location for SVR4. I forgot why redhat added the /etc/rc.d/ level. I think to isolate things onto rc.d, but then needed to add a bunch of symlinks anyway for backwards compatibility. So there is /etc/init.d in redhat, just it symlinks elsewhere.
So the standard location is /etc/init.d, though it may be a symlink not a real directory.
There were some really old Linux distros that copied BSD with /etc/rc.local but pretty much no one uses that anymore.
Slackware still uses /etc/rc.d
FreeBSD uses /etc/rc.d
and /usr/local/etc/rc.d