Can't login to desktop autometically after oem-config is finished on OEM mode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OEM Priority Project |
Fix Released
|
High
|
Unassigned | ||
ubiquity (Ubuntu) |
Fix Released
|
High
|
Mathieu Trudel-Lapierre |
Bug Description
Normally system should be able to switch to login screen after oem-config is finished. However on OEM mode the system stops with black screen after oem-config is finished.
This bug can be reproduced on Xenial daily image.
Steps:
1) Boot into OEM mode (EFI) and install the system
2) Restart system, click "Prepare for shipping to end user" and reboot system.
3) oem-config starts, enter user information
4) Black screen.
I found there has race condition between oem-config-* scripts.
First, please watch the code pieces I found in the oem-config-
for try in $(seq 1 $TRY); do
CODE=0
if [ "$FRONTEND" = debconf_ui ]; then
plymouth quit || true
LANG=en_US.UTF-8 FRONTEND=
/usr/
2>>/
|| CODE=$?
else
FRONTEND=
/usr/
/usr/
fi
if [ "$CODE" -eq 0 ]; then
# Remove the temporary OEM configuration user, if possible
# and desired.
RET="$(echo GET oem-config/remove | debconf-
if [ "${RET#* }" = true ] && getent passwd oem >/dev/null; then
pkill -u oem || true
userdel --force --remove oem || true
fi
/bin/systemctl set-default graphical.target || true
/bin/systemctl --no-block isolate graphical.target || true
exit 0
and oem-config-wrapper:
#! /bin/sh
# Run oem-config, plus other things that need to run after it in X.
set -e
LANG=en_US.UTF-8 oem-config "$@"
# 'set -e' will cause us to exit if oem-config fails. Otherwise:
# Don't run again.
rm -f /var/lib/
# Cleanup from anything the early command prepared
RET="$(echo GET oem-config/
if [ "${RET%% *}" = 0 ]; then
command="${RET#* }"
log-output sh -c "$command" || true
fi
RET="$(echo GET oem-config/remove | debconf-
if [ "${RET#* }" = true ]; then
#debconf crashes with this set (LP: #641478)
unset DBUS_SESSION_
#mandb postinst doesn't like not knowing the locale
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
fi
# We're about to pull the rug out from under our own feet, so this
# has to run very late.
case $FRONTEND in
debconf_ui)
export DEBIAN_
oem-
;;
gtk_ui)
oem-
;;
kde_ui)
export DEBIAN_FRONTEND=kde
oem-
;;
esac
fi
The /usr/sbin/
Because of oem-config-
Related branches
description: | updated |
description: | updated |
affects: | ubiquity (Ubuntu) → oem-priority |
affects: | ubiquity → ubiquity (Ubuntu) |
Changed in oem-priority: | |
importance: | Undecided → Critical |
Changed in oem-priority: | |
importance: | Critical → High |
Changed in ubiquity (Ubuntu): | |
status: | Confirmed → In Progress |
importance: | Undecided → High |
assignee: | nobody → Mathieu Trudel-Lapierre (cyphermox) |
Changed in oem-priority: | |
status: | New → Fix Released |
If we skip 'oem-config- remove- gtk', then process could be finished and desktop can be started.