Use chreipl to set the IPL device on s390x (#632325)
Remove existing reIPL configuration code and replace with a call
to chreipl(8) from s390utils. Log errors and on failure, pass an
statement to the user telling them what to do next to continue
installation.
---
iutil.py | 203 +++++++---------------------------------------------------
packages.py | 13 +----
2 files changed, 26 insertions(+), 190 deletions(-)
-
-def reIPLtrigger(anaconda):
- if not isS390():
- return
- if anaconda.canReIPL:
- log.info("reIPL configuration successful => reboot")
- os.kill(os.getppid(), signal.SIGUSR2)
- else:
log.info("reIPL configuration failed => halt")
os.kill(os.getppid(), signal.SIGUSR1)
-
-def reIPL(anaconda, loader_pid):
- instruction = _("After shutdown, please perform a manual IPL from the device "
- "now containing /boot to continue installation")
-
- reipl_path = "/sys/firmware/reipl"
-
- try:
- ipldev = anaconda.platform.bootDevice().disk.name
- except:
- ipldev = None
-
- if ipldev is None:
- message = _("Error determining boot device's disk name")
- log.warning(message)
- return (message, instruction)
-
- message = (_("The mount point /boot or / is on a disk that we are not familiar with"), instruction)
- if ipldev.startswith("dasd"):
- message = reIPLonCCW(ipldev, reipl_path)
- elif ipldev.startswith("sd"):
- message = reIPLonFCP(ipldev, reipl_path)
-
- if message is None:
- anaconda.canReIPL = True
else:
- anaconda.canReIPL = False
- log.info(message)
-
- reIPLtrigger(anaconda)
+ anaconda.canReIPL = True
+ message = None
+ log.info("reIPL configuration successful => reboot")
+ os.kill(os.getppid(), signal.SIGUSR2)
- # the final return is either None if reipl configuration worked (=> reboot),
- # or a two-item list with errorMessage and rebootInstr (=> shutdown)
return message
def doReIPL(anaconda):
-# # This is here as an example to fix the screen during the TUI debugging path
-# anaconda.intf.screen.suspend ()
-# import pdb
-# pdb.set_trace ()
-
if not iutil.isS390() or anaconda.dir == DISPATCH_BACK:
return DISPATCH_NOOP