I recently found this home networking tutorial surprisingly enlightening. However, there is one thing I don't understand:

Disabling NFS Start On Boot: If you are not planning on regularly accessing files via NFS, you should not leave the NFS server running and vulnerable to outside attacks. The startup scripts for NFS are in the /etc/rc* directories and you should rename them with the K prefix instead of the S prefix so they do not start at boot time:

the tutorial then gives the following command:

sudo rename s/S/K/ /etc/rc*/*nfs*

I have never really understood the way /etc/rc*/ works. But I assume there are certain directories in which the service servicename start scripts are always run, right? That's just a guess.

So, in this case, why does renaming these have an effect? How does the naming of directories affect this particular instance? What does that rename command actually do? Why does the new directory name ensure that NFS is not started at boot time?

  • that rename command also moves S01mountkernfs.sh -- in case anyone reading this uses it. bad idea for newer kernels. – ixtmixilix Mar 7 '12 at 13:00
up vote 2 down vote accepted

Scripts in the /etc/rc?.d directories that start with S are used to start services. Scripts that start with K are used to stop (kill) services. By renaming all the NFS related init scripts starting with S to start with K, you insure that NFS services are never started by default.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.