Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for dumb or unset TERM #2

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion dietpi/dietpi-banner
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
#/////////////////////////////////////////////////////////////////////////////////////
# Main Loop
#/////////////////////////////////////////////////////////////////////////////////////
export TERM=${TERM:-dumb}
if (( "$TERM" == "dumb" )); then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exit also gets triggered with dropbear logins.

Heres the value of TERM:
export TERM=${TERM:-dumb}; echo -e "$TERM"
xterm

I tested with the following, exit doesnt get triggered with dropbear:
if [ "$TERM" = "dumb" ]; then

Tested with the following to confirm trigger works (exit got triggered):
if [ "$TERM" = "xterm" ]; then

If you can test with openssh server, just to verify:
if [ "$TERM" = "dumb" ]; then

Thanks tdaitx.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exit is triggered on scp with openssh server and not triggered on the usual ssh login (just it should be). Thanks!

exit
fi

if (( $INPUT == 0 )); then
Banner_Dietpi
elif (( $INPUT == 1 )); then
Expand All @@ -65,4 +70,4 @@

#Run whole script in a function. Loads into memory, allows for online file patching.
exit
}
}