forked from Mirror/pmbootstrap
Use doas instead of sudo if installed (MR 2091)
Prefer using doas over sudo if both are installed. Let the user override the sudo tool with PMB_SUDO.
This commit is contained in:
parent
2801b5d687
commit
c1407f921b
8 changed files with 60 additions and 8 deletions
|
@ -71,7 +71,7 @@ def root(args, cmd, suffix="native", working_dir="/", output="log",
|
|||
executables = executables_absolute_path()
|
||||
cmd_chroot = [executables["chroot"], chroot, "/bin/sh", "-c",
|
||||
pmb.helpers.run.flat_cmd(cmd, working_dir)]
|
||||
cmd_sudo = ["sudo", "env", "-i", executables["sh"], "-c",
|
||||
cmd_sudo = [pmb.config.sudo, "env", "-i", executables["sh"], "-c",
|
||||
pmb.helpers.run.flat_cmd(cmd_chroot, env=env_all)]
|
||||
return pmb.helpers.run_core.core(args, msg, cmd_sudo, None, output,
|
||||
output_return, check, True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue