Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 104187 - ifdown ip call needs 'dev'
ifdown ip call needs 'dev'
Product: Red Hat Raw Hide
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2003-09-10 18:43 EDT by Matt Domsch
Modified: 2014-03-16 22:38 EDT (History)
1 user (show)

See Also:
Fixed In Version: 7.32-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-09-11 00:14:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matt Domsch 2003-09-10 18:43:06 EDT
Description of problem:
The ifdown script calls 'ip link set ${DEVICE} down'.   This fails for some
devices with a message saying it needs to know what dev is, needs to be 'ip link
set dev ${DEVICE} down'.

Version-Release number of selected component (if applicable):

How reproducible:
always for my built-in ethernet 'b', never for my built-in wireless 'w'

Steps to Reproduce:
1. ifup b
2. ifdown b
Actual results:
ifdown fails with error that it doesn't know what <dev> to change.

Expected results:
ifdown succeeds

Additional info:

--- /sbin/ifdown.~1~    2003-06-23 23:13:19.000000000 -0500
+++ /sbin/ifdown        2003-09-10 12:36:58.000000000 -0500
@@ -100,7 +100,7 @@
 if [ "${REALDEVICE}" = "${DEVICE}" ]; then
-  ip link set ${DEVICE} down
+  ip link set dev ${DEVICE} down
 [ "$retcode" = "0" ] && retcode=$?
Comment 1 Bill Nottingham 2003-09-10 21:17:17 EDT
So, you get this error only if you call your interface 'b'? Interesting.
Comment 2 Matt Domsch 2003-09-10 23:53:49 EDT
Right, and reading the manual, I see why.  It's a problem with all of the ip
calls in initscripts...

You can abbreviate all of the arguments to the commands.  In the link ${DEVICE}
up/down case, $DEVICE="b" -> "broadcast", which then requires a device.  Similar
problems would happen with devices named a, u, d, m, n, t, or the words they
specify.  By saying 'dev ${DEVICE}' it forces the $DEVICE to be used as the
device name, which is exactly what you want.
Comment 3 Bill Nottingham 2003-09-11 00:14:31 EDT
All 14 instances fixed in CVS, will be in 7.32-1.

Note You need to log in before you can comment on or make changes to this bug.