We now always call lsb_release() with the application-wide dry-run
boolean. All calls should now be consistent (i.e. without a mix of
examples and files coming from the host)
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
So that we consistently return the same value from lsb_release() across
all calls that use dry-run, the function now accepts a dry_run argument
(defaulting to False). This way, in dry-run mode, the caller does not
need to supply the path to a specific example file anymore.
lsb_release(dry_run=True) -> will load examples/lsb-release-focal
Having said that, the caller is still left with the possibility to
specify the example file by using the path argument:
lsb_release(path="example/lsb-release-impish")
The path and dry_run arguments are mutually exclusive: providing both
will result in a ValueError.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Also, splits part of the configure() method:
- `__query_uid()` finds the username UID
- `_create_user()` creates the user set in IdentityModel
- Both methods accept a fake root path under dryrun.
The UA screen is now shown only if we are running on an LTS release.
In dry-run mode, we pretend to always be on Ubuntu focal.
To implement the possibility to skip the screen, we added another POST
resource to inform the server that we are finished configuring
UbuntuAdvantage.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
- This is a cleanup for SystemSetup per DEENG-134 and DEENG-139
- Default user should be set by the WSL launcher.
- Shutdown/reboot actions also.
- Added a structured form of communication between OOBE and launcher.
- /run/launcher-command
Introduce a new view, model and controllers pair to enable Ubuntu
Advantage from Subiquity. For now, we expect the user to input an
alphanumeric token and rely on cloud-init to enable the features
associated with the subscription.
This implementation comes with a number of limitations:
* inability to validate the token before first-boot
* inability to check what features are associated with the Ubuntu
Advantage subscription, before first-boot
* the user must input the token directly: there is no mechanism to
deduce the token based on email address and password.
The new screen is placed after the identity scree. The installation
should already be running when the UA screen will be shown to the user.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Read ID_MODEL/VENDOR_ENC for disks to allow the GUI installer to show
pretty disk names without having to call libudev through FFI.
As a bonus, this also fixes disk names to match the machine config in
dry-run mode.
Related issues
- FR-1710
- canonical/ubuntu-desktop-installer#415