Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 120874

Summary: iproute2-051007 - ip doesn't support command shortening anymore
Product: Gentoo Linux Reporter: Jan Minar <jjminar+bgo>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 2005.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jan Minar 2006-01-29 14:48:26 UTC
ip(8) used to support command shortening, so one could do things like ``ip r'' or ``ip r a default via 10.0.0.2''.  I use it in all my scripts, so now not even the loop device is set up after bootup.  Gosh this was just about the sexiest feature of the FLOSS world.

Example of what should work but doesn't:

$ ip r
Object "r" is unknown, try "ip help".

Instead, one has to say:

$ ip route
10.0.0.0/24 dev eth0  proto kernel  scope link  src 10.0.0.13 
default via 10.0.0.2 dev eth0
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-01-29 14:52:18 UTC
Reopen with iproute2 version...
Comment 2 Jan Minar 2006-01-29 15:52:10 UTC
(In reply to comment #1)
> Reopen with iproute2 version...

$  eix iproute | grep Installed:
     Installed:           051007
$ ip -V
ip utility, iproute2-ss051007
Comment 3 SpanKY gentoo-dev 2006-01-29 16:40:16 UTC
well `ip r` wouldnt work now anyways as there is 'route' and 'rule' ...
Comment 4 Jan Minar 2006-01-29 17:15:49 UTC
(In reply to comment #3)
> well `ip r` wouldnt work now anyways as there is 'route' and 'rule' ...

I've seen the shortened versions so many times it didn't occur to me the interface could change.  Is this a feature then?  So that it's clear the syntax is ``ip route'', not ``ip r'', and scripts I write today will work forever without alterations?

I would prefere whatever worked yesterday would work today, the new keywords *addign* to the syntax, not *replacing* parts of it.  E.g.:

    r -> route
    ru -> rule
Comment 5 SpanKY gentoo-dev 2006-01-29 18:00:03 UTC
looks like a bad example

iproute2-2.6.10.20050112-r1 supports both 'rule' and 'route' but 'ip r' defaults to route as you showed
Comment 6 SpanKY gentoo-dev 2006-01-29 19:10:55 UTC
aaaaaand this is a bug as newer versions support `ip r` again ;)

upgrade to 2.6.15.20060110