diff --git a/autoinstall-schema.json b/autoinstall-schema.json index 69a402a9..cd950b54 100644 --- a/autoinstall-schema.json +++ b/autoinstall-schema.json @@ -396,7 +396,12 @@ } }, "drivers": { - "type": "boolean" + "type": "object", + "properties": { + "install": { + "type": "boolean" + } + } }, "timezone": { "type": "string" diff --git a/subiquity/server/controllers/drivers.py b/subiquity/server/controllers/drivers.py index 5932d826..7b64e37d 100644 --- a/subiquity/server/controllers/drivers.py +++ b/subiquity/server/controllers/drivers.py @@ -33,17 +33,25 @@ class DriversController(SubiquityController): autoinstall_key = model_name = "drivers" autoinstall_schema = { - 'type': 'boolean', + 'type': 'object', + 'properties': { + 'install': { + 'type': 'boolean', + }, + }, } - autoinstall_default = False + autoinstall_default = {"install": False} has_drivers = None def make_autoinstall(self): - return self.model.do_install + return { + "install": self.model.do_install, + } def load_autoinstall_data(self, data): - self.model.do_install = data + if data is not None and "install" in data: + self.model.do_install = data["install"] def start(self): self._wait_apt = asyncio.Event()