#!/bin/sh

if [ -f /etc/rc.d/machineDir.IBM_NS.setup ]; then
   . /etc/rc.d/machineDir.IBM_NS.setup

   if [ $MACHINE_TEMPLATE = "KIOSK_SBOOT_TEMPLATE" ]; then
	 if [ ! -d /home/system-default/KIOSK/.ICAClient ]; then
         mkdir /home/system-default/KIOSK/.ICAClient
	 fi
      if [ -L $HOME/.ICAClient ]; then
         # we were using system defaults so remove this link
         rm -f $HOME/.ICAClient
         cp -af /home/system-default/KIOSK/.ICAClient $HOME/
      fi
   elif [ $MACHINE_TEMPLATE = "NONKIOSK_SBOOT_TEMPLATE" ]; then
      if [ ! -d /etc/sysconfig/ICAClient ]; then
         mkdir /etc/sysconfig/ICAClient
	    chmod 755 /etc/sysconfig/ICAClient
	 fi
   fi
fi

if [ -L /usr/lib/ICAClient ]; then

   cd /usr/lib/ICAClient
   ./wfcmgr $*

else
   echo "Temp ram disk for ICA doesn't exist"
fi

