Customises WSL system_setup Help/About message.
This commit is contained in:
parent
cbb491bb91
commit
2adc001693
|
@ -14,12 +14,39 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
from subiquitycore.lsb_release import lsb_release
|
||||
from subiquity.client.client import SubiquityClient
|
||||
|
||||
log = logging.getLogger('system_setup.client.client')
|
||||
|
||||
ABOUT_UBUNTU_WSL = _("""
|
||||
Welcome to the Ubuntu WSL Installer!
|
||||
|
||||
A full Ubuntu environment, deeply integrated with Windows,
|
||||
for Linux application development and execution.
|
||||
Optimised for cloud, web, data science, IOT and fun!
|
||||
|
||||
The installer will guide you through installing Ubuntu WSL
|
||||
{release} LTS.
|
||||
|
||||
The installer only requires the up and down arrow keys, space (or
|
||||
return) and the occasional bit of typing.
|
||||
|
||||
This is version {snap_version} of the installer.
|
||||
""")
|
||||
|
||||
|
||||
def _about_msg(msg, dry_run):
|
||||
info = lsb_release(dry_run=dry_run)
|
||||
info.update({
|
||||
'snap_version': os.environ.get("SNAP_VERSION", "SNAP_VERSION"),
|
||||
'snap_revision': os.environ.get("SNAP_REVISION", "SNAP_REVISION"),
|
||||
})
|
||||
return msg.format(**info)
|
||||
|
||||
|
||||
class SystemSetupClient(SubiquityClient):
|
||||
|
||||
|
@ -46,3 +73,8 @@ class SystemSetupClient(SubiquityClient):
|
|||
"Summary",
|
||||
]
|
||||
}
|
||||
|
||||
def __init__(self, opts):
|
||||
super().__init__(opts)
|
||||
self.help_menu.about_message = \
|
||||
_about_msg(ABOUT_UBUNTU_WSL, self.opts.dry_run)
|
||||
|
|
|
@ -58,6 +58,7 @@ class SystemSetupModel(SubiquityModel):
|
|||
self.userdata = {}
|
||||
self.locale = LocaleModel(self.chroot_prefix)
|
||||
self.identity = IdentityModel()
|
||||
self.network = None
|
||||
self.wslconfbase = WSLConfigurationBaseModel()
|
||||
self.wslconfadvanced = WSLConfigurationAdvancedModel()
|
||||
|
||||
|
|
Loading…
Reference in New Issue