Compare commits

...

6 Commits

Author SHA1 Message Date
Natalia Serrano 2e092b0372 Merge pull request 'Disable IPv6 in oglive' (#2) from oglive-ipv6 into main
Reviewed-on: #2
2024-09-25 11:08:01 +02:00
Natalia Serrano 985d83fe5e Revert "refs #773 do not use python apt module"
This reverts commit a12001f84a.
2024-09-24 13:02:05 +02:00
Natalia Serrano 16482c60fd Revert "refs #776 install ogagent dependencies"
This reverts commit 3833919272.
2024-09-24 13:01:59 +02:00
Natalia Serrano 3833919272 refs #776 install ogagent dependencies 2024-09-24 13:01:05 +02:00
Natalia Serrano a12001f84a refs #773 do not use python apt module 2024-09-24 13:00:47 +02:00
Natalia Serrano e60695f847 refs #773 write a sysctl.conf 2024-09-24 12:52:06 +02:00
2 changed files with 8 additions and 0 deletions

View File

@ -243,6 +243,13 @@ def copy_og_files (builder, og_shared, og_engine, ogclientmount, osdistrib, osco
if os.path.exists (f'{og_shared}/bin/browser'): shutil.copy (f'{og_shared}/bin/browser', f'{ogclientmount}/bin/')
if os.path.exists (f'{og_shared}/bin/ogAdmClient'): shutil.copy (f'{og_shared}/bin/ogAdmClient', f'{ogclientmount}/bin/')
def sysctl (btrootfsmnt):
logger.debug ('copiando sysctl.conf')
with open (f'{btrootfsmnt}/etc/sysctl.conf', 'w') as fd:
fd.write ('net.ipv6.conf.all.disable_ipv6 = 1\n')
fd.write ('net.ipv6.conf.default.disable_ipv6 = 1\n')
fd.write ('net.ipv6.conf.lo.disable_ipv6 = 1\n')
def ssh_server (btrootfsmnt):
if not os.path.exists ('/root/.ssh/id_rsa'): ## creates a key pair in the VM (or docker container), not in the chroot
utils.run (['ssh-keygen', '-q', '-f', '/root/.ssh/id_rsa', '-N', ''])

View File

@ -87,6 +87,7 @@ def _chroot_tasks (cfgfile, curdir, osrelease, osarch):
def _ssh_stuff (btrootfsimg, btrootfsmnt):
_mount_rootfs (btrootfsimg, btrootfsmnt)
btog.sysctl (btrootfsmnt)
btog.ssh_server (btrootfsmnt)
btog.ssh_client (btrootfsmnt)
utils.umount (btrootfsmnt)