Merge pull request 'refs #2778 fix multiple bugs' (#120) from oginit-else-branch into main
ogclient/pipeline/head This commit looks good Details
ogclient/pipeline/tag This commit looks good Details

Reviewed-on: #120
pull/121/head 1.5.1
Natalia Serrano 2025-09-12 14:40:58 +02:00
commit e32d736a71
2 changed files with 14 additions and 5 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.5.1] - 2025-09-12
### Fixed
- Fixed multiple bugs in a rarely-executed "else" branch
## [1.5.0] - 2025-09-11
### Changed

View File

@ -11,12 +11,11 @@ from NetLib import ogGetIpAddress
ogstatus = os.environ.get ('ogstatus', '')
ogcore = os.environ.get ('ogcore', '')
oglog = os.environ.get ('oglog', '')
oggroup = os.environ.get ('OGGROUP', '')
ogactiveadmin = os.environ.get ('ogactiveadmin', '')
LANG = os.environ.get ('LANG', 'es_ES')
LANG = LANG[0:LANG.index('_')]
LOGLEVEL=5
#LOGLEVEL=5
# Matando plymount para inicir browser o shell
subprocess.run (['pkill', '-9', 'plymouthd'])
@ -37,12 +36,16 @@ if os.path.exists ('/usr/share/OGAgent/opengnsys/linux/OGAgentService.py') and o
subprocess.run (['python3', '-m', 'opengnsys.linux.OGAgentService', 'fg'])
else:
ip = ogGetIpAddress()
OGMENU = ''
for FILE in [index, oggroup, ip]:
OGMENU = None
for FILE in ['index', ip]:
if not FILE: continue
m = f'{ogGlobals.OGCAC}/menus/{FILE}.html'
if os.path.exists (m): OGMENU = m
subprocess.run ([f'{ogGlobals.OPENGNSYS}/bin/launch_browser', m])
if OGMENU:
subprocess.run ([f'/usr/bin/launch_browser', OGMENU])
else:
print ("ogagent not installed and couldn't find any menu to show")
# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
if ogactiveadmin == 'true':