Merge lp:~cyphermox/ubiquity/oem-config into lp:ubiquity

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 6285
Merged at revision: 6284
Proposed branch: lp:~cyphermox/ubiquity/oem-config
Merge into: lp:ubiquity
Diff against target: 95 lines (+32/-6)
6 files modified
bin/oem-config-firstboot (+2/-0)
bin/oem-config-prepare (+1/-1)
debian/changelog (+20/-0)
debian/oem-config.install (+1/-0)
debian/oem-config.oem-config.service (+1/-5)
debian/oem-config.target (+7/-0)
To merge this branch: bzr merge lp:~cyphermox/ubiquity/oem-config
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
Dimitri John Ledkov Approve
Review via email: mp+255103@code.launchpad.net

Description of the change

oem-config work to better handle systemd -- introducing a new oem-config.target rather than using a flag to control the starting of oem-config.

This also fixes issues with the oem user not always being removed successfully (because it turned out that oem-config would start as well as parts of the graphical.target, so oem could have some processes running)

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) :
review: Approve
lp:~cyphermox/ubiquity/oem-config updated
6285. By Mathieu Trudel-Lapierre

Remove sleep+kill, it's unnecessary if the graphical target never gets to start (ie. doesn't try to start display-manager)

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Approving the extra commit, which is a change we discussed on #ubuntu-installer.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/oem-config-firstboot'
2--- bin/oem-config-firstboot 2013-10-14 17:27:56 +0000
3+++ bin/oem-config-firstboot 2015-04-02 17:55:20 +0000
4@@ -77,6 +77,8 @@
5 pkill -u oem || true
6 userdel --force --remove oem || true
7 fi
8+ /bin/systemctl set-default graphical.target || true
9+ /bin/systemctl --no-block isolate graphical.target || true
10 exit 0
11 elif [ "$CODE" -eq 10 ]; then
12 cat <<EOF
13
14=== modified file 'bin/oem-config-prepare'
15--- bin/oem-config-prepare 2015-02-18 21:02:05 +0000
16+++ bin/oem-config-prepare 2015-04-02 17:55:20 +0000
17@@ -28,7 +28,7 @@
18 # Potentially sensitive.
19 rm -f /home/oem/.ssh/known_hosts
20
21- touch /var/lib/oem-config/run
22+ /bin/systemctl set-default oem-config.target
23 else
24 pkexec "$0" ${quiet:---quiet} "$@"
25 fi
26
27=== modified file 'debian/changelog'
28--- debian/changelog 2015-03-24 20:18:03 +0000
29+++ debian/changelog 2015-04-02 17:55:20 +0000
30@@ -1,3 +1,23 @@
31+ubiquity (2.21.18) UNRELEASED; urgency=medium
32+
33+ * Overhaul for proper systemd support (LP: #1436937)
34+ * bin/oem-config-prepare: set the systemd default target to oem-config.target
35+ instead of using /var/lib/oem-config/run as a flag.
36+ * bin/oem-config-firstboot:
37+ - after removing the oem user, set the default target back to graphical.
38+ - call for systemd to start the graphical target, so as to complete booting
39+ to graphical or to TTYs after oem-config-firstboot has run.
40+ * debian/oem-config.target: create a new target for oem-config so that it can
41+ start without conflicting with a display-manager that may also want to
42+ start and use the oem user in auto-login.
43+ * debian/oem-config.oem-config.service: simplify the service's start
44+ conditions; we don't really need to worry about Before/After since we'll
45+ run in our own isolated target.
46+ * debian/oem-config.install: force the installation of the new target in the
47+ right location for systemd.
48+
49+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Thu, 02 Apr 2015 11:03:51 -0400
50+
51 ubiquity (2.21.17) vivid; urgency=medium
52
53 * Update the sed for the path to keyboard-configuration.config from
54
55=== modified file 'debian/oem-config.install'
56--- debian/oem-config.install 2010-04-13 23:49:07 +0000
57+++ debian/oem-config.install 2015-04-02 17:55:20 +0000
58@@ -3,3 +3,4 @@
59 bin/oem-config-remove usr/sbin
60 bin/oem-config-wrapper usr/sbin
61 scripts/ubi-reload-keyboard /usr/lib/oem-config/post-install
62+debian/oem-config.target /lib/systemd/system
63
64=== modified file 'debian/oem-config.oem-config.service'
65--- debian/oem-config.oem-config.service 2015-01-15 11:00:28 +0000
66+++ debian/oem-config.oem-config.service 2015-04-02 17:55:20 +0000
67@@ -1,10 +1,6 @@
68 [Unit]
69 Description=End-user configuration after initial OEM installation
70-Before=display-manager.service
71-After=plymouth-quit.service
72-Conflicts=getty@tty1.service
73 ConditionFileIsExecutable=/usr/sbin/oem-config-firstboot
74-ConditionPathExists=/var/lib/oem-config/run
75 ConditionPathExists=/dev/tty1
76
77 # We never want to run the oem-config job in the live environment (as is the
78@@ -33,4 +29,4 @@
79 exec oem-config-firstboot $debug $automatic'
80
81 [Install]
82-WantedBy=multi-user.target
83+WantedBy=oem-config.target
84
85=== added file 'debian/oem-config.target'
86--- debian/oem-config.target 1970-01-01 00:00:00 +0000
87+++ debian/oem-config.target 2015-04-02 17:55:20 +0000
88@@ -0,0 +1,7 @@
89+[Unit]
90+Description=OEM Configuration
91+Requires=basic.target
92+Conflicts=rescue.service rescue.target multi-user.target
93+After=basic.target rescue.service rescue.target
94+AllowIsolate=yes
95+Wants=oem-config.service

Subscribers

People subscribed via source and target branches

to status/vote changes: