#!/bin/sh # an installation script for Wnn4.2 check_pw() { if which -s pw; then : else cat < /dev/null` id_wnn=`id -u wnn 2> /dev/null` if [ X"$id_wnn" != X ];then exit 0 elif [ X"$id_69" != X ]; then cat < ${startup_script}; echo "wnn=${wnnserver}" >> ${startup_script}; echo 'if [ -x $wnn ]; then' >> ${startup_script}; echo " ${wnnstat} -L ${wnn_lang} localhost > /dev/null 2>&1" >> ${startup_script}; echo ' if [ $? = 255 ]; then' >> ${startup_script}; echo " rm -f ${wnn_socket}" >> ${startup_script}; echo " echo -n ' ${wnnname}'" >> ${startup_script}; echo ' $wnn' >> ${startup_script}; echo " fi" >> ${startup_script}; echo "fi" >> ${startup_script}; if [ $1 = zh-Wnn-4.2 ]; then wnnserver=${PKG_PREFIX}/bin/cWnn4/tserver wnn_lang=zh_TW wnn_socket=/tmp/td_sockV4 echo "wnn=${wnnserver}" >> ${startup_script}; echo 'if [ -x $wnn ]; then' >> ${startup_script}; echo " ${wnnstat} -L ${wnn_lang} localhost > /dev/null 2>&1" >> ${startup_script}; echo ' if [ $? = 255 ]; then' >> ${startup_script}; echo " rm -f ${wnn_socket}" >> ${startup_script}; echo " echo -n ' ${wnnname}'" >> ${startup_script}; echo ' $wnn' >> ${startup_script}; echo " fi" >> ${startup_script}; echo "fi" >> ${startup_script}; fi chmod 755 ${startup_script}; chown bin.bin ${startup_script}; fi ;; esac