Bug 212067

Summary: /etc/init.d/network status gives wrong info
Product: Red Hat Enterprise Linux 5 Reporter: Paul Morgan <pmorgan>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED CURRENTRELEASE QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: 5.0CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.45-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-24 20:29:48 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:
Attachments:
Description Flags
corrects typo'd line in /etc/init.d/network none

Description Paul Morgan 2006-10-24 20:25:56 UTC
Description of problem:
`service network status' shows no devices under "Currently active devices:"

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

How reproducible:
every time: typo in init script

Steps to Reproduce:
1. /etc/init.d/network status
  
Actual results:
no devices are shown

Expected results:
list of active links

Additional info:
--- /etc/init.d/network 2006-07-26 21:17:04.000000000 -0500
+++ /tmp/network        2006-10-24 15:18:50.000000000 -0500
@@ -277,7 +277,7 @@
        echo lo $interfaces

        echo $"Currently active devices:"
-       echo `/sbin/ip -o link show | awk -F ": " '/UP>/ { print $2 }'`
+       echo `/sbin/ip -o link show | awk -F ": " '/\<UP\>/ { print $2 }'`
        ;;
   restart|reload)
         cd "$CWD"


Note that in the original version, the right angle bracket should be escaped
to indicate regex word boundary. Corrected version also adds word boundary
before UP just in case.

Comment 1 Paul Morgan 2006-10-24 20:25:56 UTC
Created attachment 139268 [details]
corrects typo'd line in /etc/init.d/network

Comment 2 Bill Nottingham 2006-10-24 20:29:48 UTC
This has since been fixed.