Bug 212067 - /etc/init.d/network status gives wrong info
/etc/init.d/network status gives wrong info
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts (Show other bugs)
5.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-24 16:25 EDT by Paul Morgan
Modified: 2014-03-16 23:03 EDT (History)
1 user (show)

See Also:
Fixed In Version: 8.45-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-24 16:29:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
corrects typo'd line in /etc/init.d/network (371 bytes, patch)
2006-10-24 16:25 EDT, Paul Morgan
no flags Details | Diff

  None (edit)
Description Paul Morgan 2006-10-24 16:25:56 EDT
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 16:25:56 EDT
Created attachment 139268 [details]
corrects typo'd line in /etc/init.d/network
Comment 2 Bill Nottingham 2006-10-24 16:29:48 EDT
This has since been fixed.

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