Bug 104187

Summary: ifdown ip call needs 'dev'
Product: [Retired] Red Hat Raw Hide Reporter: Matt Domsch <matt_domsch>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

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.