#!/bin/sh
#
# Copyright (c) 1997, 1995 by Tadpole Technology PLC.
# All Rights Reserved
#
#ident	"$Header: /net/projects/S2.6/cvs/os_net/src_ws/usr/src/tadcmd/initpkg/init.d/kspcmcia,v 1.3 1998/01/26 09:08:26 ang Exp $"

# When the system is first booted after installation initpcmcia cannot
# do anything because the devices don't exist and the initial drvconfig
# has the potential to fail to make pem because it tries to do that before
# there is a nexus (ts102, stp4020...).
# In this case this script cuts in and tries to fix things up before the
# pcmciad tries to start.
#
case "$1" in
'start')
	if [ -n "${_INIT_RECONFIG}" -a -c /dev/pcmcia/0 -a ! -c /dev/pem ]
	then
	    drvconfig -i pem
	    devlinks
	fi
	;;
'stop')
	;;
*)
	echo "Usage: $0 start|stop"
	;;
esac

exit 0
