diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-07-30 16:37:28 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-07-30 16:40:07 +0200 |
commit | 9a553765b458df510b50b44499bb5988a169d014 (patch) | |
tree | 508fa641013414544e89c7907123f8daf035d892 /src/utils/postinstall.py | |
parent | 1329c0955bfed81556073bccefd7844847632544 (diff) |
utils: postinstall: show hostname in logs
Display the hostname that is set in the logs.
Diffstat (limited to 'src/utils/postinstall.py')
-rw-r--r-- | src/utils/postinstall.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/postinstall.py b/src/utils/postinstall.py index 374a1cd..f52ca77 100644 --- a/src/utils/postinstall.py +++ b/src/utils/postinstall.py @@ -23,7 +23,7 @@ CONFIGUREOS_LEGACY_ENABLED = False def set_windows_hostname(disk, partition, name): - logging.info(f'Configuring hostname') + logging.info(f'Setting Windows hostname to {name}') if len(name) > 15: logging.warning(f'Windows does nor permit hostnames that exceed 15 characters. Truncating {name}') @@ -61,13 +61,13 @@ def set_windows_hostname(disk, partition, name): hive.commit(hive_path) except Exception as e: - raise OgError(f'Unable to configure Windows hostname: {e}') from e + raise OgError(f'Unable to set Windows hostname: {e}') from e finally: umount(mountpoint) def set_linux_hostname(disk, partition, name): - logging.info(f'Configuring hostname') + logging.info(f'Setting Linux hostname to {name}') device = get_partition_device(disk, partition) mountpoint = device.replace('dev', 'mnt') @@ -80,7 +80,7 @@ def set_linux_hostname(disk, partition, name): with open(hostname_path, 'w') as f: f.write(name) except OSError as e: - raise OgError(f'Unable to configure Linux hostname: {e}') from e + raise OgError(f'Unable to set Linux hostname: {e}') from e finally: umount(mountpoint) |