%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 188.40.95.74 / Your IP : 216.73.216.188 Web Server : Apache System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64 User : vlasotin ( 1054) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/leapp-repository/repositories/system_upgrade/common/actors/removeresumeservice/ |
Upload File : |
import errno import os from leapp import reporting from leapp.actors import Actor from leapp.libraries.stdlib import api, run from leapp.reporting import create_report, Report from leapp.tags import FirstBootPhaseTag, IPUWorkflowTag class RemoveSystemdResumeService(Actor): """ Remove systemd service to launch Leapp. After system was rebooted and process resumed, this service is not necessary anymore. """ name = 'remove_systemd_resume_service' consumes = () produces = (Report,) tags = (FirstBootPhaseTag.After, IPUWorkflowTag) def process(self): service_name = 'leapp_resume.service' if os.path.isfile('/etc/systemd/system/{}'.format(service_name)): run(['systemctl', 'disable', service_name]) paths_to_unlink = [ '/etc/systemd/system/{}'.format(service_name), '/etc/systemd/system/default.target.wants/{}'.format(service_name), ] for path in paths_to_unlink: try: os.unlink(path) except OSError as e: api.current_logger().debug('Failed removing {}: {}'.format(path, str(e))) if e.errno != errno.ENOENT: raise create_report([ reporting.Title('"{}" service deleted'.format(service_name)), reporting.Summary( '"{}" was taking care of resuming upgrade process ' 'after the first reboot.'.format(service_name)), reporting.Groups([reporting.Groups.UPGRADE_PROCESS]), ])