Skip to content

Commit

Permalink
additional check for /etc/sysconfig/network/ifcfg-<fcoe_vlan_if>
Browse files Browse the repository at this point in the history
  • Loading branch information
gabi2 committed Sep 12, 2013
1 parent daa226e commit 2b30905
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/modules/FcoeClient.rb
Expand Up @@ -546,7 +546,6 @@ def CreateFcoeConfig(vlan_device_name, netcard)
def GetFcoeStatus(vlan_device_name, device_name)
status_map = {}
content = ""
file_exists = false
file_name = ""
device = vlan_device_name

Expand All @@ -565,6 +564,13 @@ def GetFcoeStatus(vlan_device_name, device_name)
if !FileUtils.Exists(file_name)
# no config file found - return empty status map
return deep_copy(status_map)
else
# check whether there is a sysconfig file for given vlan_device_name
file_name = Builtins.sformat("/etc/sysconfig/network/ifcfg-%1", vlan_device_name);
# configuration in /etc/fcoe/cfg-<device_name> doesn't belong to vlan_device_name
if !FileUtils.Exists(file_name)
return deep_copy(status_map)
end
end
device = device_name
end
Expand Down

0 comments on commit 2b30905

Please sign in to comment.