LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

[Dependencies] apt-get install expect

Open UltimateByte opened this issue 10 years ago • 8 comments

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.

UltimateByte avatar Apr 16 '16 21:04 UltimateByte

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.

UltimateByte avatar Apr 17 '16 01:04 UltimateByte

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.

dgibbs64 avatar May 24 '16 19:05 dgibbs64

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).

cedarlug avatar May 24 '16 20:05 cedarlug

@dgibbs64 Why not separate requirements and advised packages ? I'm thinking about postfix/mailutils & expect

UltimateByte avatar May 30 '16 09:05 UltimateByte

Has this been actioned?

I will need to review having required and optional I think https://github.com/dgibbs64/linuxgsm/issues/873

dgibbs64 avatar Jun 09 '16 19:06 dgibbs64

stdbuf as a fallback to expect as described above, was part of pull-request #834.

cedarlug avatar Jun 09 '16 20:06 cedarlug

Awesome thanks

dgibbs64 avatar Jun 11 '16 18:06 dgibbs64

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.

lock[bot] avatar Jul 19 '18 09:07 lock[bot]