From 43815bf6a7717b73395baef50d78076dce1794ae Mon Sep 17 00:00:00 2001 From: Spirit Date: Mon, 19 Aug 2024 19:52:35 +0300 Subject: [PATCH] use `doas` after configuring it --- setup-void.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/setup-void.sh b/setup-void.sh index 28c52cb..3941149 100755 --- a/setup-void.sh +++ b/setup-void.sh @@ -39,21 +39,22 @@ while [ $# -gt 0 ]; do shift done -# update the package manager -sudo xbps-install -Suy xbps - -# setup doas -if [ install_doas -eq 1 ]; then - sudo xbps-install -y opendoas - sudo bash -c "echo 'permit nopass $USER as root' > /etc/doas.conf" -fi - if command -v doas &> /dev/null; then doas="doas" else doas="sudo" fi +# update the package manager +$doas xbps-install -Suy xbps + +# setup doas +if [ install_doas -eq 1 ]; then + $doas xbps-install -y opendoas + $doas bash -c "echo 'permit nopass $USER as root' > /etc/doas.conf" + doas="doas" +fi + # update conflicted deps $doas xbps-install -yu util-linux # install deps required for setup