Merge pull request 'Disable IPv6 in oglive' (#2) from oglive-ipv6 into main
Reviewed-on: #2pull/4/head
commit
2e092b0372
|
@ -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', ''])
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue