I understand why hard links on directories are dangerous (loops, problems for rmdir because of the parent-directory-link) and have read the other questions on that topic. And so I assumed that hard links on directories apart from . and .. are not used. And yet I see the following on CentOS 5 & 6:
# ls -id /etc/init.d/
459259 /etc/init.d/
# ls -id /etc/rc.d/init.d/
459259 /etc/rc.d/init.d/
# ls -id /etc/init.d/../
458798 /etc/init.d/../
# ls -id /etc/rc.d/
458798 /etc/rc.d/
# ls -id /etc/
425985 /etc/
In other words 2 different paths to directories pointing to the same inode and the parent of /etc/init.d/ pointing to /etc/rc.d/ instead of /etc/. Is this really a case of hard-linked directories? If not, what is it? If yes, why does Red Hat do that?
Edit: I'm sorry for asking a stupid question, I should have been able to see that it's a symlink. Not enough coffee today, it seems.