Compare commits
6 Commits
62ee6e6c8a
...
2e092b0372
Author | SHA1 | Date |
---|---|---|
|
2e092b0372 | |
|
985d83fe5e | |
|
16482c60fd | |
|
3833919272 | |
|
a12001f84a | |
|
e60695f847 |
|
@ -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