MCPcopy Index your code
hub / github.com/archlinux/archinstall / enable_service

Method enable_service

archinstall/lib/installer.py:719–733  ·  view source on GitHub ↗
(self, services: str | list[str])

Source from the content-addressed store, hash-verified

717 self.enable_service('fstrim.timer')
718
719 def enable_service(self, services: str | list[str]) -> None:
720 if isinstance(services, str):
721 services = [services]
722
723 for service in services:
724 info(f'Enabling service {service}')
725
726 try:
727 SysCommand(f'systemctl --root={self.target} enable {service}')
728 except SysCallError as err:
729 raise ServiceException(f'Unable to start service {service}: {err}')
730
731 for plugin in plugins.values():
732 if hasattr(plugin, 'on_service'):
733 plugin.on_service(service)
734
735 def disable_service(self, services_disable: str | list[str]) -> None:
736 if isinstance(services_disable, str):

Callers 15

enable_espeakupMethod · 0.95
enable_periodic_trimMethod · 0.95
setup_btrfs_snapshotMethod · 0.95
setup_swapMethod · 0.95
installMethod · 0.80
installMethod · 0.80
installMethod · 0.80
installMethod · 0.80

Calls 3

infoFunction · 0.90
SysCommandClass · 0.90
ServiceExceptionClass · 0.90

Tested by

no test coverage detected