From b547d6c53599d5909005ddae1843a23f4ed7066f Mon Sep 17 00:00:00 2001 From: Codex Date: Tue, 13 Oct 2026 15:15:31 +0300 Subject: [PATCH] Keep Hydra OS branding through disk installation --- bin/hydra | 2 +- hydra/__init__.py | 2 +- hydra/installer.py | 6 +++--- tests/test_installer.py | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/hydra b/bin/hydra index 6265501..ffb090c 100755 --- a/bin/hydra +++ b/bin/hydra @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Run HydraOS from this checkout without installing a host package.""" +"""Run Hydra OS from this checkout without installing a host package.""" import sys from pathlib import Path diff --git a/hydra/__init__.py b/hydra/__init__.py index 6cbeed2..deb519d 100644 --- a/hydra/__init__.py +++ b/hydra/__init__.py @@ -1 +1 @@ -"""HydraOS independent VM management.""" +"""Hydra OS independent VM management.""" diff --git a/hydra/installer.py b/hydra/installer.py index 30418f4..f399059 100644 --- a/hydra/installer.py +++ b/hydra/installer.py @@ -432,7 +432,7 @@ def render_plan(request, target, root): '/boot/initramfs-.img', ''], grub_command(root), ['chroot', str(root), 'grub-mkconfig', '-o', '/boot/grub/grub.cfg'], ] - lines = [f'HydraOS {"EXECUTION" if request.execute else "dry-run"}: erase all data on {target}.', + lines = [f'Hydra OS {"EXECUTION" if request.execute else "dry-run"}: erase all data on {target}.', 'GPT: exactly 1 GiB FAT32 ESP, remaining space ext4 root.', f'Prepared payload: {request.payload}; account: {request.user}; timezone: {request.timezone}.', 'Commands (UUIDs/kernel discovered after unpacking; no commands run in dry-run):'] @@ -631,7 +631,7 @@ def install(request, runner, probe, root, password, log: TextIO): dbus_machine_id.unlink(missing_ok=True) write_config(root, 'etc/dracut.conf.d/90-hydra-installed.conf', 'hostonly="no"\nhostonly_cmdline="no"\nomit_dracutmodules+=" dmsquash-live "\n# No root=live: or rd.live arguments on the installed disk.\n') - write_config(root, 'etc/default/grub', 'GRUB_DISTRIBUTOR="HydraOS"\nGRUB_CMDLINE_LINUX=""\nGRUB_TIMEOUT=3\n') + write_config(root, 'etc/default/grub', 'GRUB_DISTRIBUTOR="Hydra OS"\nGRUB_CMDLINE_LINUX=""\nGRUB_TIMEOUT=3\n') write_config(root, 'etc/sudoers.d/90-hydra-admin', '%wheel ALL=(ALL:ALL) ALL\n', 0o440) mount(['mount', '--rbind', '/dev', str(root / 'dev')], root / 'dev', True) run(['mount', '--make-rslave', str(root / 'dev')]) @@ -711,7 +711,7 @@ def prompt_password(): def main(argv=None): - parser = argparse.ArgumentParser(description='HydraOS explicit whole-disk installer; dry-run by default') + parser = argparse.ArgumentParser(description='Hydra OS explicit whole-disk installer; dry-run by default') parser.add_argument('--disk', help='explicit physical whole-disk target; never automatically selected') parser.add_argument('--user', help='installed administrator username') parser.add_argument('--payload', default=DEFAULT_PAYLOAD, help='prepared live squashfs root payload') diff --git a/tests/test_installer.py b/tests/test_installer.py index 3ededb0..2935c3d 100644 --- a/tests/test_installer.py +++ b/tests/test_installer.py @@ -177,6 +177,7 @@ class PipelineTests(unittest.TestCase): self.assertIn('hostonly_cmdline="no"', (self.root / 'etc/dracut.conf.d/90-hydra-installed.conf').read_text()) self.assertIn('omit_dracutmodules+=" dmsquash-live "', (self.root / 'etc/dracut.conf.d/90-hydra-installed.conf').read_text()) self.assertNotIn('root=live:', (self.root / 'etc/default/grub').read_text()) + self.assertIn('GRUB_DISTRIBUTOR="Hydra OS"', (self.root / 'etc/default/grub').read_text()) dracut = next(c for c in runner.calls if 'dracut' in c) self.assertIn('6.12.1', dracut) self.assertEqual(runner.calls[-1], ['umount', str(self.root)])