[Dependencies] apt-get install expect
Found out why some of my servers were not refreshing the output while installing/updating/validating. Missing package : expect
This package is available for Debian based distros, including Ubuntu. Don't know for others.
Without it, it's a bit problematic to not see the current status while doing some operations, si i guess it'd be great to add it to the dependencies.
Quotation from CedarLUG, who i think makes a point.
I think unbuffer shouldn't be used in LGSM. stdbuf is more common. "stdbuf -i0 -o0 -e0" sets all to unbuffered. there are only a few functions that check for it...should be a drop-in replacement at the check $(command -v unbuffer) change that to $(command -v stdbuf) and replace the condition with: unbuffer="stdbuf -i0 -o0 -e0" Although "expect" is an awesome tool to have on the system... stdbuf is a core utility. One downside - I don't think stdbuf works with tee (but then again, neither would unbuffer).
In the end > Could use unbuffer if available, otherwise use stdbuf, otherwise go without.
expect is required for fn_stop_telnet_sdtd to function. However this can be listed as a requirements only for 7 Days to Die. I am happy to use unbuffer or stdbuf.
I do currently use tee with the command but wasnt aware that this may not work. Ideally I want the output un buffered and be able to output to logs.
So i think what needs to happen is the following:
add stdbuf as an option either fallback or primary confirm if tee works with unbuffer and stdbuf or not.
@UltimateByte or @cedarlug I am happy for either of you to work on this if you like.
I'll put a pull request up that modifies all checks for unbuffer so that it checks first for stdbuf, then unbuffer.
Just verified the "install_server_files.sh" functionality works identical to unbuffer with the pipes to tee (on Debian 8).
Will verify the same with the other 2 locations (validate and update).
@dgibbs64 Why not separate requirements and advised packages ? I'm thinking about postfix/mailutils & expect
Has this been actioned?
I will need to review having required and optional I think https://github.com/dgibbs64/linuxgsm/issues/873
stdbuf as a fallback to expect as described above, was part of pull-request #834.
Awesome thanks
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.