Hi Ted,
On Tue, Feb 14, 2017 at 11:37:30AM -0500, Ted Unangst wrote:
| So the man page currently says "fail if doas would prompt for password."
| although it would be more accurate to say "fail if does may prompt for a
| password". The purpose of -n is to make sure a script will run with or without
| persist, instead of being unpredictable.
Yep, that's the behavior I experienced and it's definitely an
understandable approach.
| Also, the way persist is tied to a process group means it's not great for
| scripting anyway.
Well, in my case I can simply not use doas -n and ensure my script
works without prompting for passwords more than once (which is what I
care about). However, I have to say that doas works great in
scripting setups: it asks for a password once and then all subsequent
invocations of doas do not. Once the script ends, the process group
is gone and with it, the persist ticket. So, yeah, persist works
great for scripting.
Cheers,
Paul 'WEiRD' de Weerd
--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
http://www.weirdnet.nl/