#!/bin/sh

#pragma ident "@(#)skip_conf.sh	1.2 96/05/20"

if [ $# -lt 1 ]
then
	echo "usage: $0 variable [value(s)]" 1>&2
	exit 1
fi

SUNOS=`/bin/uname -r | /bin/sed 's/\..*//g'`
if [ $SUNOS = 5 ]; then
	SKIP_BIN=/opt/SUNWicg/bin
	SKIP_ETC=/etc/opt/SUNWicg/skip
else
	SKIP_BIN=/usr/skip/bin
	SKIP_ETC=/etc/skip
fi

VARIABLE=$1
shift

/bin/grep -v "^$VARIABLE" $SKIP_ETC/skipd.conf > /tmp/skipd.conf$$

if [ $# -gt 0 ]
then
	for i in $*
	do
		echo "$VARIABLE $i" >> /tmp/skipd.conf$$
	done
fi

cp /tmp/skipd.conf$$ $SKIP_ETC/skipd.conf
rm /tmp/skipd.conf$$
