remove compatibility links to programs from /etc
A small menagerie of compatibility symlinks exists in
/etc for programs otherwise delivered in
/usr/lib/saf. There is little historical context I have been able to find about why these are in here, other than a general sense of organic/haphazard construction present in UNIX systems that have survived many decades of engineering effort.
Some relevant historical material from ARC cases and Sun bugs:
- PSARC/2010/289 Remove binary symlinks from /etc (this includes a long
- 4856275 /etc needs a cleanup
- 7019375 Cleanup /etc
While the vast majority of these should be removed, there are at least a few special cases that need more careful consideration:
/etc/rmtostensibly represents part of the remote magnetic tape protocol and likely needs to remain in place
/etc/prtconfmay have been used by Java for something, but that may also have been fixed a decade ago; see JDK-7022473
/etc/telinitprobably needs to become
/sbin/telinit, but then we probably need to leave it in place for some amount of time as well because it had no
/sbinanalogue (or perhaps it doesn't matter; it's unclear to me when someone would actually use
There are likely references within the gate that use these paths which we would have to verify and clean up. It's possible that there are also other special cases that need to remain in place that don't appear in the list above. Delete, but with care!
Updated by Garrett D'Amore 2 months ago
Yes, /etc/rmt is used by legacy remote tape protocol, which is actually "rsh" style based. I suspect nobody uses it, as it's horribly insecure, but I recall deciding to leave it in place while at PSARC. Note that /etc/tar might fall into this category as well.
Once, very very long ago, there was no /sbin, or /usr/sbin... and instead people would put administrator programs in /etc, and /etc was commonly in sysadmin paths. This goes back to SunOS versions based on BSD. (SunOS 4 and earlier).
I think it's time to clean this up (and it was probably time two decades ago).
Updated by Peter Tribble 2 months ago
I tried to remove all the legacy /etc symlinks in Tribblix, and only got a small handful removed
although some of those were because the target itself is removed.
What I did find was that it's actually quite a lot of effort to conclusively prove that there's nothing out there that might still be using or referencing the legacy symlinks. Even within the gate:
umount is referenced in volmgt
telinit is documented in init.8
sulogin is used by init
mount is referenced by svr4pkg
labelit is used by getvol
grpck is documented as being in /etc
It soon became clear that for a general-purpose distro with a strong focus on legacy compatibility, the effort required to prove that any symlink was safe to remove in all circumstances vastly outweighed any benefit from its removal. Other distributions may legitimately decide that's not an interesting requirement.