kimwida Posted September 10, 2020 Posted September 10, 2020 Armbianmonitor: http://ix.io/2x38 Hi. I am digging many things with armbian so I install fresh armbian and many applications so many times. So I am making a long script to install many applications and edit many configuration. When it asked "Yes/On" on text prompt, I use "#echo yes | apt install vim". It works well. But when I install samba, it ask text prompt "yes/no" at first and then with dialog box "yes/no". So I tried "#echo yes | echo no | apt install samba". But it doesn't work. How can I send "yes/no" to dialog box in bash shell??
Werner Posted September 10, 2020 Posted September 10, 2020 Seems to be more a userspace issue, therefore moved to p2p.
guidol Posted September 10, 2020 Posted September 10, 2020 5 hours ago, kimwida said: When it asked "Yes/On" on text prompt, I use "#echo yes | apt install vim". It works well. But when I install samba, it ask text prompt "yes/no" at first and then with dialog box "yes/no". So I tried "#echo yes | echo no | apt install samba". But it doesn't work. How can I send "yes/no" to dialog box in bash shell?? I dont know if it works for a samba-dialog-box, but you could try the following options with apt-get (not only apt): root@npi-neo2-22(192.168.6.22):~# man apt-get|grep yes -y, --yes, --assume-yes Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively. If an Force yes; this is a dangerous option that will cause apt to continue without prompting if it is Force yes; this is a dangerous option that will cause apt to continue without prompting if it is --force-yes Force yes; this is a dangerous option that will cause apt to continue without prompting if it is force-yes can potentially destroy your system! Configuration Item: APT::Get::force-yes. This is --assume-yes; where --assume-yes will answer yes to any prompt, --trivial-only will answer no. So without echo you could try apt-get install vim -y or apt-get install vim --force-yes
kimwida Posted September 10, 2020 Author Posted September 10, 2020 Sadly, I have to choose "yes" at first and then "no". Now I have to wait and hit "Enter" for samba install. But it saves a lot of time for me. Anyway thank you, I solved a lot of problems from your replies.
Recommended Posts