Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
|
8daaefffd1 | |
|
ae48530b95 | |
|
ab552d571d | |
|
9a0a3c2223 | |
|
458c18a8d8 | |
|
de5d4bc04b | |
|
bcf69b6bfe | |
|
616885376d |
24
CHANGELOG.md
24
CHANGELOG.md
|
@ -5,6 +5,30 @@ 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.7.2] - 2025-10-02
|
||||
|
||||
### Fixed
|
||||
|
||||
- Improve detection of BCD files for the menu entries
|
||||
|
||||
## [1.7.1] - 2025-10-02
|
||||
|
||||
### Fixed
|
||||
|
||||
- Allow to create images in regular ogLive (not ogLiveAdmin)
|
||||
|
||||
## [1.7.0] - 2025-09-29
|
||||
|
||||
### Added
|
||||
|
||||
- Add CGI error page
|
||||
|
||||
## [1.6.2] - 2025-09-26
|
||||
|
||||
### Fixed
|
||||
|
||||
- Have gitlib log less stuff, to prevent the execution from getting stuck
|
||||
|
||||
## [1.6.1] - 2025-09-25
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -73,7 +73,7 @@ if 'REPO' == repo or ogCheckIpAddress (repo):
|
|||
sys.exit (1)
|
||||
|
||||
# Si el destino es REPO y el cliente no está en modo "admin"; activar repositorio para escritura,
|
||||
if 'REPO' == repo and 'admin' != env_boot:
|
||||
if 'admin' != env_boot:
|
||||
retval = subprocess.run ([f'{dirname}/CambiarAcceso', 'admin']).returncode
|
||||
if retval:
|
||||
sys.exit (retval)
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Content-type: text/html"
|
||||
echo ""
|
||||
echo "<html><head><title>OpenGnsys Client $(/opt/opengnsys/functions/ogGetIpAddress)</title>"
|
||||
echo " <meta charset='utf-8'>"
|
||||
echo "</head><body>"
|
||||
|
||||
echo "<h1>Ocurrió un error durante el arranque del agente</h1>"
|
||||
|
||||
echo "<p>Consulte el log del agente para más información</p>"
|
||||
echo "</body></html>"
|
|
@ -14,4 +14,4 @@ echo "<IFRAME SRC='cache.sh' WIDTH=590 HEIGHT=90><A HREF="cache.sh">link</a>
|
|||
echo "<IFRAME SRC='LogSession.sh' WIDTH=850 HEIGHT=230> <A HREF="LogSession.sh">link</A> </IFRAME>"
|
||||
echo "<IFRAME SRC='LogCommand.sh' WIDTH=850 HEIGHT=280> <A HREF="LogCommand.sh">link</A> </IFRAME>"
|
||||
|
||||
echo "</body>
|
||||
echo "</body></html>"
|
||||
|
|
|
@ -10,5 +10,4 @@ echo "<html><head><title>OpenGnsys Client</title></head><body>"
|
|||
$(wget http://172.17.9.205/opengnsys/varios/menubrowser.php -O /tmp/menu.tmp)
|
||||
echo "$(cat /tmp/menu.tmp)"
|
||||
|
||||
echo "</body>
|
||||
|
||||
echo "</body></html>"
|
||||
|
|
|
@ -427,14 +427,22 @@ class OpengnsysGitLibrary:
|
|||
|
||||
if result.returncode == 0:
|
||||
self.logger.debug("Completed, return code %i", result.returncode)
|
||||
self.logger.debug("STDOUT: %s", result.stdout)
|
||||
self.logger.debug("STDERR: %s", result.stderr)
|
||||
#self.logger.debug("STDOUT: %s", result.stdout)
|
||||
#self.logger.debug("STDERR: %s", result.stderr)
|
||||
else:
|
||||
# An error return code can be returned for reasons like missing files, so we deal this
|
||||
# as non-fatal.
|
||||
self.logger.error("Completed, return code %i", result.returncode)
|
||||
self.logger.error("STDOUT: %s", result.stdout)
|
||||
|
||||
#self.logger.error("STDOUT: %s", result.stdout)
|
||||
fd = open ('/tmp/ntfssecaudit.stdout', 'wb')
|
||||
fd.write (result.stdout)
|
||||
fd.close()
|
||||
|
||||
self.logger.error("STDERR: %s", result.stderr)
|
||||
fd = open ('/tmp/ntfssecaudit.stderr', 'wb')
|
||||
fd.write (result.stderr)
|
||||
fd.close()
|
||||
|
||||
|
||||
self.fs.temp_remount(mountdata)
|
||||
|
@ -504,6 +512,9 @@ class OpengnsysGitLibrary:
|
|||
|
||||
boot_device = self.fs.find_boot_device()
|
||||
boot_mount = self.fs.find_mountpoint(boot_device)
|
||||
if boot_mount is None:
|
||||
self.logger.warning(f"Not installing EFI files--boot_mount is None")
|
||||
return
|
||||
|
||||
self.logger.info(f"Installing EFI files in {boot_mount}")
|
||||
meta_dir = os.path.join(root_directory, ".opengnsys-metadata")
|
||||
|
@ -535,6 +546,9 @@ class OpengnsysGitLibrary:
|
|||
def _efi_copy(self, root_directory, system_specific = False, config_name = None):
|
||||
meta_dir = os.path.join(root_directory, ".opengnsys-metadata")
|
||||
boot_device = self.fs.find_boot_device()
|
||||
if boot_device is None:
|
||||
self.logger.warning("Not copying EFI--boot_device is None")
|
||||
return
|
||||
boot_mount = self.fs.find_mountpoint(boot_device)
|
||||
efi_files_dir = ""
|
||||
|
||||
|
@ -620,7 +634,7 @@ class OpengnsysGitLibrary:
|
|||
self.logger.debug(f"Archive: {metadata}")
|
||||
|
||||
for entry in metadata:
|
||||
self.logger.debug(entry)
|
||||
#self.logger.debug(entry)
|
||||
if entry.pathname in wanted_files:
|
||||
self.logger.debug(f"Extracting {entry}")
|
||||
data = bytearray()
|
||||
|
@ -1112,7 +1126,7 @@ class OpengnsysGitLibrary:
|
|||
with open(os.path.join(meta_dir, "empty_directories.jsonl"), "r", encoding='utf-8') as empties_file:
|
||||
for line in empties_file:
|
||||
if line.isspace():
|
||||
self.logger.debug("Empty line, skipping")
|
||||
#self.logger.debug("Empty line, skipping")
|
||||
continue
|
||||
|
||||
empties_data = json.loads(line)
|
||||
|
@ -1124,12 +1138,12 @@ class OpengnsysGitLibrary:
|
|||
|
||||
empty_dir_keep = os.path.join(path, empty_dir, ".opengnsys-keep")
|
||||
|
||||
self.logger.debug(f"Empty directory: {empty_dir}")
|
||||
#self.logger.debug(f"Empty directory: {empty_dir}")
|
||||
full_empty_dir = os.path.join(path, empty_dir)
|
||||
Path(full_empty_dir).mkdir(parents=True, exist_ok=True)
|
||||
|
||||
if os.path.exists(empty_dir_keep):
|
||||
self.logger.debug(f"Deleting: {empty_dir_keep}")
|
||||
#self.logger.debug(f"Deleting: {empty_dir_keep}")
|
||||
os.unlink(empty_dir_keep)
|
||||
|
||||
if not destructive_only:
|
||||
|
@ -1840,7 +1854,7 @@ if __name__ == '__main__':
|
|||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
streamLog = logging.StreamHandler()
|
||||
streamLog.setLevel(logging.INFO)
|
||||
streamLog.setLevel(logging.WARNING)
|
||||
|
||||
if not os.path.exists(opengnsys_log_dir):
|
||||
os.mkdir(opengnsys_log_dir)
|
||||
|
|
|
@ -462,15 +462,14 @@ def ogGetOsVersion(disk, part):
|
|||
# Para cargador Windows: buscar versión en fichero BCD (basado en os-prober).
|
||||
if not version:
|
||||
type = 'WinLoader'
|
||||
file = FileLib.ogGetPath (file=f'{mntdir}/boot/bcd')
|
||||
if not file:
|
||||
file = FileLib.ogGetPath (file=f'{mntdir}/EFI/Microsoft/boot/bcd')
|
||||
if file:
|
||||
find_out = subprocess.run (['find', mntdir, '-type', 'f'], capture_output=True, text=True).stdout
|
||||
bcd_files = list (filter (lambda x: 'Boot/BCD' in x, find_out.splitlines()))
|
||||
if bcd_files:
|
||||
for distrib in 'Windows Recovery', 'Windows Boot':
|
||||
with open (file, 'rb') as fd:
|
||||
contents = fd.read()
|
||||
distrib_utf16_regex = re.sub (r'(.)', '\\1.', distrib)
|
||||
distrib_utf16_regex = bytes (distrib_utf16_regex, 'ascii')
|
||||
with open (bcd_files[0], 'rb') as fd:
|
||||
contents = fd.read()
|
||||
if re.search (distrib_utf16_regex, contents):
|
||||
version = f'{distrib} loader'
|
||||
# Para macOS: detectar kernel y completar con fichero plist de información del sistema.
|
||||
|
|
Loading…
Reference in New Issue