Hacker News new | ask | show | jobs
by zdw 5592 days ago
It's not that it self-perpetuates, it's that nearly every other Unix does it that way, and thus there's an expectation that ifconfig, if it exists, has similar functionality on all platforms.

If you're going to deprecate a command, make running the old one either:

1. Not exist, and thus have the shell throw an "command not found" error

2. Print a useful message like "Use <newcommand> instead"

3. Work, but do #2 as well.

The current situation is like leaving a pair of rusty pliers out in the open, and hiding the brand new socket set when the goal is tightening a bunch of bolts.

3 comments

Yeah, the Linux distros (which themselves obviously only use 'ip') should have done #2 10 years ago.

When I worked at Red Hat (till 2005) their official RHCE documentation still told people to use ifconfig and route.

I agree wholeheartedly that the old tools should be hidden away, and I assume that they haven't been, because that will break more things than the actual renaming of devices. I bet even adding deprecation warnings could cause a ruckus, seeing how many times I've come across `ifconfig | something` both in scripts and people shelling out from other languages. I do wish the distros would just make a clean break, and let people fix their crappy code.
Then you just make the deprecation warning go to stderr instead of stdout. '|' only redirects stdout.
True - I'm just grasping as straws to come up with an excuse as to why this has gone on for so long.
Love the tools analogy! So true. LOL