Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 694402

Summary: "find: /sys/class/iscsi_session/: No such file or directory" when shutting down or rebooting
Product: Red Hat Enterprise Linux 5 Reporter: Pierre Carrier <prc>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.6CC: notting
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-07 15:33:12 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 Pierre Carrier 2011-04-07 08:47:42 UTC
Description of problem:
- When shutting down or rebooting, if /sys/class/iscsi_session/ does not exist, /etc/rc.d/init.d/network shows an error

Version-Release number of selected component (if applicable):
initscripts-8.45.33-1.el5.x86_64

Steps to Reproduce:
1. Set up a machine without iSCSI
2. Log the console output
3. # shutdown -h now
  
Actual results:
"""
Shutting down system logger: [ OK ] 
find: /sys/class/iscsi_session/: No such file or directory 
Shutting down interface eth0: [ OK ]
"""

Expected results:
- No error messages.


Additional info:
- Can be fixed with:

--- etc/rc.d/init.d/network.orig	2011-04-07 09:43:38.000000000 +0100
+++ etc/rc.d/init.d/network	2011-04-07 09:43:57.000000000 +0100
@@ -202,3 +202,3 @@
 	if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
-		if [ `find /sys/class/iscsi_session/ -mindepth 1 -maxdepth 1 -type d | wc -l` -ge 1 ]; then
+		if [ `find /sys/class/iscsi_session/ -mindepth 1 -maxdepth 1 -type d 2> /dev/null | wc -l` -ge 1 ]; then
 			exit 1

Visitors, please note that:
- This is a benign error message, it can be discarded.
- It will only appear in runlevel 0, 1, 6, hence not during a simple "service network restart".

Comment 1 Bill Nottingham 2011-04-07 15:33:12 UTC

*** This bug has been marked as a duplicate of bug 687849 ***