#!/bin/sh
USEIPKG=""
if [ -d /opt -a -f /opt/bin/ipkg ] ; then
     USEIPKG="true";
elif [ -d /opt -a -f /opt/bin/opkg ] ; then
     USEIPKG="true";
elif [ -d /opt -a -f /opt/bin/opkg-cl ] ; then
     USEIPKG="true";
elif [ -d /Apps/opt -a -f /Apps/opt/bin/opkg ] ; then
     USEIPKG="true";
fi

if [ -z "${USEIPKG}" ] ; then
     if [ "${SYNOPKG_DSM_LANGUAGE}" = "ger" ] ; then
          /bin/cat `dirname $0`/ipkg_de.txt > ${SYNOPKG_TEMP_LOGFILE}
     else
          /bin/cat `dirname $0`/ipkg_en.txt > ${SYNOPKG_TEMP_LOGFILE}
     fi
     exit 1
fi

if [ ! -f /usr/bin/perl ] ; then
     if [ "${SYNOPKG_DSM_LANGUAGE}" = "ger" ] ; then
          /bin/cat `dirname $0`/perl_de.txt > ${SYNOPKG_TEMP_LOGFILE}
     else
          /bin/cat `dirname $0`/perl_en.txt > ${SYNOPKG_TEMP_LOGFILE}
     fi
     exit 1
fi
exit 0