Compare commits
11 Commits
move-ogGet
...
main
Author | SHA1 | Date |
---|---|---|
|
7624964ba1 | |
|
c3e86b7dc0 | |
|
a18e861bea | |
|
842dbf48c2 | |
|
d79c677f16 | |
|
bd056438a1 | |
|
fb665fa4ca | |
|
c76fd8388a | |
|
fac6e142f6 | |
|
e20bd46edb | |
|
f785143b73 |
30
CHANGELOG.md
30
CHANGELOG.md
|
@ -5,6 +5,36 @@ 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).
|
||||
|
||||
## [0.8.0] - 2025-04-23
|
||||
|
||||
### Added
|
||||
|
||||
- Have the oglive agent send /stopped on poweroff or restart
|
||||
|
||||
## [0.7.2] - 2025-04-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- Have the partitioning functions return a meaningful rc
|
||||
|
||||
## [0.7.1] - 2025-04-15
|
||||
|
||||
### Fixed
|
||||
|
||||
- getConfiguration.py: don't fail if NTFS filesystems are mounted ro
|
||||
|
||||
## [0.7.0] - 2025-04-15
|
||||
|
||||
### Removed
|
||||
|
||||
- Removed references to ogGlobals.OGLOG in python code
|
||||
|
||||
## [0.6.1] - 2025-04-15
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed capturing of partclone output and management of return value
|
||||
|
||||
## [0.6.0] - 2025-04-15
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
os.system ('pkill -f OGAgent')
|
||||
time.sleep (3)
|
||||
os.system ('poweroff')
|
||||
sys.exit (0)
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
os.system ('pkill -f OGAgent')
|
||||
time.sleep (3)
|
||||
os.system ('reboot')
|
||||
sys.exit (0)
|
||||
|
|
|
@ -74,4 +74,5 @@ else:
|
|||
|
||||
# Borramos marcas de arranque de Windows
|
||||
for f in glob.glob ('/mnt/*/ogboot.*') + glob.glob ('/mnt/*/*/ogboot.*'):
|
||||
os.unlink (f)
|
||||
try: os.unlink (f)
|
||||
except: pass
|
||||
|
|
|
@ -179,7 +179,7 @@ def ogCreatePartitions (disk, parts):
|
|||
p = subprocess.run (['sfdisk', DISK], input=sfdisk_input, capture_output=True, text=True)
|
||||
subprocess.run (['partprobe', DISK])
|
||||
if CACHESIZE: CacheLib.ogMountCache()
|
||||
return True
|
||||
return not p.returncode
|
||||
|
||||
|
||||
#/**
|
||||
|
@ -285,7 +285,7 @@ def ogCreateGptPartitions (disk, parts):
|
|||
p = subprocess.run (['sgdisk'] + DELOPTIONS + OPTIONS + [DISK], capture_output=True, text=True)
|
||||
subprocess.run (['partprobe', DISK])
|
||||
if CACHESIZE: CacheLib.ogMountCache()
|
||||
return True
|
||||
return not p.returncode
|
||||
|
||||
|
||||
#/**
|
||||
|
|
|
@ -512,6 +512,8 @@ def ogRestoreImage (repo, imgpath, disk, par):
|
|||
rc = None
|
||||
try:
|
||||
p = subprocess.run (program, shell=True, capture_output=True, text=True)
|
||||
print (p.stdout)
|
||||
print (p.stderr)
|
||||
rc = p.returncode
|
||||
if not rc:
|
||||
SystemLib.ogRaiseError ([], ogGlobalsOG_ERR_IMAGE, f'{imgfile}, {disk}, {par}')
|
||||
|
|
|
@ -61,9 +61,8 @@ OGPYFUNCS = os.path.join (OPENGNSYS, 'functions')
|
|||
OGSCRIPTS = os.path.join (OPENGNSYS, 'scripts')
|
||||
OGIMG = os.path.join (OPENGNSYS, 'images')
|
||||
OGCAC = os.path.join (OPENGNSYS, 'cache')
|
||||
OGLOG = '/var/log'
|
||||
OGLOGFILE = f'{OGLOG}/clone-engine.log'
|
||||
OGJSONLOGFILE = f'{OGLOG}/clone-engine.json.log'
|
||||
OGLOGFILE = '/var/log/clone-engine.log'
|
||||
OGJSONLOGFILE = '/var/log/clone-engine.json.log'
|
||||
DEBUG = 'yes'
|
||||
_path = os.environ['PATH'] + ':/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/opt/oglive/rootfs/opt/drbl/sbin'
|
||||
os.environ['PATH'] = ':'.join ([OGSCRIPTS, _path, OGAPI, OGBIN])
|
||||
|
|
|
@ -145,6 +145,10 @@ def main (repo, imgname, disk, par, proto='UNICAST', protoopt=''):
|
|||
SystemLib.ogEcho (['log', 'session'], None, f'[55] {ogGlobals.lang.MSG_HELP_ogRestoreImage}: restoreImage {params}')
|
||||
retval = subprocess.run (['restoreImage.py'] + params).returncode
|
||||
|
||||
## turn shell's success into python success (without ending up with True or False)
|
||||
if retval: retval = 0
|
||||
else: retval = 1
|
||||
|
||||
# Mostrar resultados.
|
||||
resumerestoreimage = subprocess.run (['grep', '--max-count', '1', 'Total Time:', ogGlobals.OGLOGCOMMAND], capture_output=True, text=True).stdout
|
||||
SystemLib.ogEcho (['log', 'session'], None, f' [ ] {resumerestoreimage} ')
|
||||
|
|
|
@ -21,7 +21,7 @@ if len (sys.argv) > 1:
|
|||
#SERVERLOGDIR = unused
|
||||
|
||||
# Fichero de listado: hard-IP
|
||||
HARDFILE = f'{ogGlobals.OGLOG}/hard-{ogGetIpAddress()}'
|
||||
HARDFILE = f'/tmp/hard-{ogGetIpAddress()}'
|
||||
out = ogListHardwareInfo()
|
||||
with open (HARDFILE, 'w') as fd:
|
||||
fd.write (out)
|
||||
|
|
|
@ -18,7 +18,7 @@ prog = os.path.basename (sys.argv[0])
|
|||
|
||||
def main (disk, par, reduced):
|
||||
ip = NetLib.ogGetIpAddress()
|
||||
softfile = f'{ogGlobals.OGLOG}/soft-{ip}-{disk}-{par}'
|
||||
softfile = f'/tmp/soft-{ip}-{disk}-{par}'
|
||||
software_list = InventoryLib.ogListSoftware (disk, par)
|
||||
|
||||
if reduced:
|
||||
|
|
Loading…
Reference in New Issue