is_installed() { for LOCATION in `grep "^dest\>" /etc/ipkg.conf | cut -d ' ' -f 3`; do if [ "$LOCATION" = "/" ]; then grep -q "^$1\$" /usr/lib/ipkg/status else grep -q "^$1\$" $LOCATION/usr/lib/ipkg/status fi done }