mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-04 02:15:24 +01:00
Move chroot transition script inside bootstrap.
This commit is contained in:
parent
35a7df58b7
commit
c6c8a1eb7f
5 changed files with 21 additions and 28 deletions
15
sysc.py
15
sysc.py
|
|
@ -73,21 +73,6 @@ class SysC(SysGeneral):
|
|||
if not self.chroot:
|
||||
umount(self.rootfs_dir)
|
||||
|
||||
def chroot_transition(self, original):
|
||||
"""
|
||||
For chroot, transition sysa -> sysc
|
||||
See create_sysc in sysb/run.sh
|
||||
We skip sysb when using chroot, as sysb is entirely irrelevant
|
||||
to chrooting (only for kernel shenanigans)
|
||||
Copy directories from /usr (sysa) -> /usr (sysc)
|
||||
"""
|
||||
run('sudo', 'chown', '-R', getpass.getuser(), original)
|
||||
run('sudo', 'chown', '-R', getpass.getuser(), self.rootfs_dir)
|
||||
shutil.copytree(os.path.join(original, 'usr'),
|
||||
os.path.join(self.rootfs_dir, 'usr'),
|
||||
ignore=shutil.ignore_patterns("src"),
|
||||
dirs_exist_ok=True, symlinks=True)
|
||||
|
||||
def deploy_scripts(self):
|
||||
"""Add the scripts to the chroot"""
|
||||
src_files = ['run.sh', 'run2.sh']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue