Dietpi: SSH | Syntax error: Bad function name

Created on 15 May 2018  路  9Comments  路  Source: MichaIng/DietPi

https://github.com/Fourdee/DietPi/pull/1771#issuecomment-388696242

Notes:

  • Unable to replicate with putty/kitty.
  • Unable to replicate with openssh-client on a DietPi system.
Bug

Most helpful comment

@Fourdee That solved both issues-- the -sh: 146 Syntax error and the sudo su dietpi welcome information. Thanks!

Slim

All 9 comments

@slim0287

Question:
Can you list all the system changes you've made that you can remember (eg: locale set to en_US, timezone changed, installed nextcloud)?

I've been using this Pi as a Pi-hole ad blocker and smbd server for a long time so it's a bit challenging to recall. However I believe the only system changes I made were the locale to en_US and the timezone.

@slim0287

en_US and the timezone.

Thanks 馃憤

If you get a chance, on the any of the SSH clients with this issue, once connected, please paste results:

echo $TERM
echo $LANG
echo $LC_ALL

I connected with macOS. The results were:

$ echo $TERM 
xterm-256color
$ echo $LANG
en_US.UTF-8
$ echo $LC_ALL
en_US.UTF-8

Any new insights?

Thanks

Commit sent, should be resolved with: https://github.com/Fourdee/DietPi/commit/6d20b08be0b43ee9ff4a17136ebdb4520e711352

Pending v6.9 release.

User error (me), reopened for testing.

@slim0287

Would you be willing to help us test the following (copy and paste all):

rm /etc/profile.d/99-dietpi-login.sh
sed -i '/\/DietPi/d' /root/.bashrc #should already be removed, failsafe start clean
sed -i '/\/DietPi/d' /home/dietpi/.bashrc #should already be removed, failsafe start clean

cat << _EOF_ >> /root/.bashrc
. /DietPi/dietpi/func/dietpi-globals
/DietPi/dietpi/login
_EOF_
cat << _EOF_ >> /home/dietpi/.bashrc
. /DietPi/dietpi/func/dietpi-globals
/DietPi/dietpi/login
_EOF_

Once completed, reconnect via SSH and see if the error is removed, and, you see the DietPi login banner.

@Fourdee That solved both issues-- the -sh: 146 Syntax error and the sudo su dietpi welcome information. Thanks!

Slim

@slim0287

Excellent, many thanks for testing and confirming fix. 馃憤
This fix will be applied automatically during v6.9 update (ETA: 1+ week release).

I'll mark this as resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oshank picture oshank  路  3Comments

Fourdee picture Fourdee  路  3Comments

Fourdee picture Fourdee  路  3Comments

MichaIng picture MichaIng  路  3Comments

mok-liee picture mok-liee  路  3Comments