Skip to content

Commit

Permalink
Write rd_CCW when root fs is on a network device on s390x (#577193)
Browse files Browse the repository at this point in the history
The dracutSetupString() method in the Network class needed to write out
the rd_CCW parameter, which is necessary for network devices on s390x.
The format is described in the dracut(8) man page.  The required
information has always been written to the ifcfg-DEVICE file, so we just
need to make sure it gets to dracut as well.
  • Loading branch information
dcantrell committed Mar 31, 2010
1 parent 1fab9ce commit fa174ab
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions network.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,4 +823,17 @@ def dracutSetupString(self, networkStorageDevice):

netargs += "ifname=%s:%s" % (nic, hwaddr.lower())

nettype = dev.get("NETTYPE")
subchannels = dev.get("SUBCHANNELS")
if iutil.isS390() and nettype and subchannels:
if netargs != "":
netargs += " "

netargs += "rd_CCW=%s,%s" % (nettype, subchannels)

options = dev.get("OPTIONS")
if options:
options = filter(lambda x: x != '', options.split(' '))
netargs += ",%s" % (','.join(options))

return netargs

0 comments on commit fa174ab

Please sign in to comment.