mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
install_rootfs(): add sudoers.d/wheel
This commit is contained in:
parent
539be06e8e
commit
6fdf426f6e
1 changed files with 7 additions and 3 deletions
10
image.py
10
image.py
|
@ -309,13 +309,17 @@ def install_rootfs(rootfs_device: str, bootfs_device: str, device, flavour, arch
|
|||
user=user,
|
||||
password=profile['password'],
|
||||
)
|
||||
|
||||
copy_ssh_keys(
|
||||
chroot.path,
|
||||
user=user,
|
||||
)
|
||||
with open(os.path.join(chroot.path, 'etc', 'pacman.conf'), 'w') as file:
|
||||
file.write(get_base_distro(arch).get_pacman_conf(check_space=True, extra_repos=get_kupfer_https(arch).repos))
|
||||
files = {
|
||||
'etc/pacman.conf': get_base_distro(arch).get_pacman_conf(check_space=True, extra_repos=get_kupfer_https(arch).repos),
|
||||
'etc/sudoers.d/wheel': "# allow members of group wheel to execute any command\n%wheel ALL=(ALL:ALL) ALL\n",
|
||||
}
|
||||
for target, content in files.items():
|
||||
with open(os.path.join(chroot.path, target.lstrip('/')), 'w') as file:
|
||||
file.write(content)
|
||||
if post_cmds:
|
||||
result = chroot.run_cmd(' && '.join(post_cmds))
|
||||
assert isinstance(result, subprocess.CompletedProcess)
|
||||
|
|
Loading…
Add table
Reference in a new issue