Merge pull request #1503 from mwhudson/no-snaps-ssh-desktop
skip ssh and snaplist screens for desktop install
This commit is contained in:
commit
404856aaf6
|
@ -171,6 +171,21 @@ class SnapListController(SubiquityController):
|
|||
self.loader = self._make_loader()
|
||||
self.app.hub.subscribe(InstallerChannels.SNAPD_NETWORK_CHANGE,
|
||||
self.snapd_network_changed)
|
||||
self.app.hub.subscribe(
|
||||
(InstallerChannels.CONFIGURED, 'filesystem'),
|
||||
self._confirmed)
|
||||
self._active = True
|
||||
|
||||
async def _confirmed(self):
|
||||
if self.app.base_model.source.current.variant == 'desktop':
|
||||
await self.configured()
|
||||
self._active = False
|
||||
self.loader.stop()
|
||||
|
||||
def interactive(self):
|
||||
if super().interactive():
|
||||
return self._active
|
||||
return False
|
||||
|
||||
def load_autoinstall_data(self, ai_data):
|
||||
to_install = []
|
||||
|
|
|
@ -27,6 +27,7 @@ from subiquity.common.types import (
|
|||
SSHIdentity,
|
||||
)
|
||||
from subiquity.server.controller import SubiquityController
|
||||
from subiquity.server.types import InstallerChannels
|
||||
|
||||
log = logging.getLogger('subiquity.server.controllers.ssh')
|
||||
|
||||
|
@ -55,6 +56,23 @@ class SSHController(SubiquityController):
|
|||
},
|
||||
}
|
||||
|
||||
def __init__(self, app):
|
||||
super().__init__(app)
|
||||
self.app.hub.subscribe(
|
||||
(InstallerChannels.CONFIGURED, 'filesystem'),
|
||||
self._confirmed)
|
||||
self._active = True
|
||||
|
||||
async def _confirmed(self):
|
||||
if self.app.base_model.source.current.variant == 'desktop':
|
||||
await self.configured()
|
||||
self._active = False
|
||||
|
||||
def interactive(self):
|
||||
if super().interactive():
|
||||
return self._active
|
||||
return False
|
||||
|
||||
def load_autoinstall_data(self, data):
|
||||
if data is None:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue