0

I made ipkg upgrade on my old tomatousb, which it seems resulted at least in a broken ls command:

  [root@tomatousb root]$ /bin/ls /
   /
  [root@tomatousb root]$ ls /bin
   /bin

however, the results are displayed in different colours. There is also strange behaviour:

   [root@tomatousb root]$ echo $PATH
   echo $PATH
   sh: echo: Permission denied

   [root@tomatousb root]$ /bin/echo $PATH
   /bin/echo $PATH
   /opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin

I have no glue what's wrong to it. The logs I see are as following:

 /var/log/messages
 Jan  1 04:00:11 tomatousb user.info kernel: ipt_recent v0.3.1: Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/
 Jan 31 23:10:21 tomatousb user.notice root: <<<< MPCSD: Config-files not found in /jffs/config/mpcs & /opt/etc/mpcs!!! Exit. >>>>
 Jan 31 23:11:02 tomatousb cron.err crond[143]: time disparity of 25290430 minutes detected
 Jan 31 23:37:26 tomatousb authpriv.info dropbear[505]: Child connection from *.*.*.*:*

So, basically, when I do SSH, I get to dropbear. It seems that during the last ipkg upgrade I got new bash, tcpdump, and two more items, but I can't recall which exactly.. And I can't find the ipkg logfile...

puff
  • 21
  • 1
  • looks not programming related, you should try your question in a more specific forum like superuser.com or serverfault.com. – LMC Jan 31 '18 at 20:28

1 Answers1

0

Finally I bumped into my own old discussion when I had the same issue with the same box, and here's what was the reason:

    [root@tomatousb mnt]$ cat /opt/etc/profile
    #
    # Bash initialization script
    #

    PS1="[\u@\h \W]$ "
    PATH=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin
    LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}

    export PS1 PATH LD_LIBRARY_PATH
    [root@tomatousb mnt]$ rm /opt/etc/profile

Then I did reboot, and everything restored back to normal operation! Do not know what exactly was in that profile file that ruined everything and caused 'memory exhausted' error when running vi.

puff
  • 21
  • 1