On Wed, Dec 03, 2014 at 02:54:14PM -0500, Zygo Blaxell wrote: > > Even with the tty/interactive shell detection in place? Maybe I > > understood the reference to lvm/mdadm tools wrong. My idea is that the > > scripts would work as now, no prompts there. > > How do we reliably distinguish between > "running in a script interactively", > "running in a script non-interactively", > and "running interactively"?
The first choice is to use isatty() function, but this would not be enough to detect #1, which would require an extra option to force the itneractive mode. > I could easily run a script from the command line that creates and > destroys subvols and runs for days or weeks (in fact, I quite often do). > It would be a significant productivity hit if an upgrade made it stop > every night waiting for confirmation from a user who went home hours > ago and won't be back for hours more. Yeah, we want to avoid such surprises. Besides isatty, there could be more shell magic to detect the interactive mode reliably, I don't know. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html