add progress log

This commit is contained in:
shenyafeng 2022-06-14 09:51:12 +08:00
parent a50005490b
commit 456755370a
2 changed files with 3 additions and 3 deletions

View File

@ -3046,13 +3046,13 @@ def run(options, # type: Options
logging.info("all pkgs downloaded")
else:
return UnattendedUpgradesResult(False,_("docker fetch failed"))
# logging.info("pkg number:%d,shutdown delay time:%d s"%(len(pkgs),30*len(pkgs)))
logging.info("pkg number:%d"%(len(pkgs)))
login_manager.SetExtraInhibitShutdownDelaySec(1800)
configfilemanager.AddFileName("OTA_PKGS_TO_INSTALL")
subprocess.Popen('dbus-send --system --type=signal / com.kylin.update.notification.DownloadFinish', shell=True)
kylin_system_updater.SetConfigValue('InstallMode','auto_install','True')
elif insmod == 'bshutdown':
# logging.info("pkg number:%d,shutdown delay time:%d s"%(len(pkgs),30*len(pkgs)))
logging.info("pkg number:%d"%(len(pkgs)))
login_manager.SetExtraInhibitShutdownDelaySec(1800)
configfilemanager.AddFileName("OTA_PKGS_TO_INSTALL")
kylin_system_updater.SetConfigValue('InstallMode','auto_install','True')

View File

@ -244,7 +244,7 @@ def log_progress():
"please don't turn off the computer")
'''
# progress info
progress_file = "/var/run/kylin-unattended-upgrades.progress"
progress_file = PROGRESS_LOG
if os.path.exists(progress_file):
progress_text = open(progress_file).read()
logging.debug("progress text content %s"%progress_text)