Try the following:
After reboot you can install your /opt/etc/profile according wengis HowTo again. When you install bash again, save your old profile before and restore the old profile to /opt/etc/profile. The profile installed from ipkg bash is faulty and causes such errors.Code:ipkg remove bash reboot
Hope it helps.