-
Committer:
Dariusz Gadomski
-
Date:
2018-03-15 10:44:48 UTC
-
Revision ID:
dariusz.gadomski@canonical.com-20180315104448-kuoz2rl1v1qeedij
Fixes a systemd freeze after cancelling debconf UI.
When using systemd and performing a oem installation using a debconf_ui
frontend there is a scenario requiring a reboot to continue (more details
at LP: #1749289).
There were several causes for this:
* bin/oem-config-firstboot - 'set -e' had to be removed, because otherwise
the script was terminated and no exit code check was done so
code 10 return from oem-config-wrapper was not handled in the if block.
* bin/ubiquity cancelling the installation returned a code 10,
which then lead to performing a wizard.do_reboot(). This method
was not implemented for the debconf frontend. This caused an exception
and exiting the process with code 1.
Moreover, stealing the terminal control with the termios.TIOCSCTTY
made doing input/output in oem-config-firstboot impossible, so even
after falling into if [ $CODE -eq 10 ] block nothing was presented
to the user.
After fixing the above issues user is presented with 3 options: to try again,
launch a shell or reboot (as originally intended in the code).