Fix missing webmin install automation flags#1353
Conversation
| sudo apt-get install curl libcgi-session-perl --no-install-recommends --assume-yes </dev/null | ||
| curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh | ||
| sudo sh setup-repos.sh | ||
| sudo sh setup-repos.sh -f |
There was a problem hiding this comment.
I wonder if it's worth also doing </dev/null here to pass an empty input stream to the script and avoid other unexpected prompts? (Due to current or future bugs in a script that's out of our control)
There was a problem hiding this comment.
Not exactly sure what that does. Does that just ensure there aren't any stray characters/commands that get accidentally processed as key clicks when the script runs?
There was a problem hiding this comment.
It establishes an empty stdin stream…. So if the script stops and waits for stdin it will get an empty input and process that accordingly. The actual effect will depend on the script. We could test what happens if the repo hasn’t been added and -f not passed!
There was a problem hiding this comment.
Upon second thought, this is probably a bad idea. :)
If the behavior of the Webmin bootstrap script changes and starts prompting for something new, we probably want to expose that to users.
The </dev/null input stream workaround is more for tools like apt-get which aren’t guaranteed to always behave when running non-interactively — https://stackoverflow.com/questions/54736013/why-does-apt-get-consume-stdin-when-it-installs-something-but-not-otherwise
Adding a couple flags to automatically run commands without prompting for the Webmin
easyinstall.shsetup. These additions keep the script from prompting the user to continue:-fto thesetup-repos.shscript that adds the Webmin package repo--assume-yesfor installing thewebminpackage