Perhaps this may help...

install_bash () { PASSWD=/etc/passwd TMP=$PASSWD.tmp opkg list_installed | grep bash > /dev/null if [ $? -eq 0 ] ; then grep /bin/bash $PASSWD if [ $? -eq 0 ]; then return 0 fi fi opkg update opkg install bash cp $PASSWD $TMP cat $TMP | sed 's|/bin/ash|/bin/bash|' > $PASSWD rm $TMP }

--Bill