Bug 104187 - ifdown ip call needs 'dev'
Summary: ifdown ip call needs 'dev'
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: initscripts (Show other bugs)
(Show other bugs)
Version: 1.0
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-09-10 22:43 UTC by Matt Domsch
Modified: 2014-03-17 02:38 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Matt Domsch 2003-09-10 22:43:06 UTC
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):
initscripts-7.28-1

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
3.
    
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 @@
 fi
  
 if [ "${REALDEVICE}" = "${DEVICE}" ]; then
-  ip link set ${DEVICE} down
+  ip link set dev ${DEVICE} down
 fi
 [ "$retcode" = "0" ] && retcode=$?

Comment 1 Bill Nottingham 2003-09-11 01:17:17 UTC
So, you get this error only if you call your interface 'b'? Interesting.

Comment 2 Matt Domsch 2003-09-11 03:53:49 UTC
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 04:14:31 UTC
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.