Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
doas fails to emerge - only when scripted
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Chuck379
n00b
n00b


Joined: 13 Oct 2024
Posts: 1

PostPosted: Sun Oct 13, 2024 11:26 am    Post subject: doas fails to emerge - only when scripted Reply with quote

doas fails to emerge when running an installation script that I am writting but it does emerge successfully if do each of the steps in the installation script manually.

This is the installation script:
Code:
# installs dependencies
echo 'app-admin/doas persist' >>/etc/portage/package.use
emerge --ask=n \
  app-admin/doas \
  app-admin/eclean-kernel \
  app-portage/gentoolkit \
  net-misc/chrony \
  sys-block/io-scheduler-udev-rules \
  sys-kernel/gentoo-kernel || exit 1

# configures doas
cat <<EOF >/etc/doas.conf
# https://wiki.gentoo.org/wiki/Doas
permit  persist :wheel
permit  nopass  :wheel as root  cmd shutdown
permit  nopass  :wheel as root  cmd reboot
EOF
chown -c root:root /etc/doas.conf


---

Failed emerge info: https://bpa.st/BYWQ
Emerge pqv: https://bpa.st/XW2A
Build log: https://bpa.st/GZXQ

---

I am completly lost in this, any help would be appreciated
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22503

PostPosted: Sun Oct 13, 2024 3:51 pm    Post subject: Reply with quote

Welcome to the forums. Per Guidelines item #4, please show us how to reproduce the problem. Are all of these statements correct?
  • You are running all commands as root, from a clean root shell (via /bin/su - or a log in as root on a tty). You are not using sudo, doas, or similar. You are not letting su retain any part of the user's login environment.
  • Running emerge --ask=n app-admin/doas works correctly.
  • Running bash shown-script.sh fails.
  • You get the same version of doas in both paths.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum