#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
#
# Start script for the SPARC-Enterprise DSCP service.
#
# This service can only run on OPL.
if [ "${PLATFORM}" != "${OPL}" ]; then
exit $SMF_EXIT_ERR_CONFIG
fi
case "$1" in
'start')
exit $SMF_EXIT_ERR_CONFIG
fi
if [ ! -c $DM2S_DEVICE ]; then
exit $SMF_EXIT_ERR_CONFIG
fi
if [ ! -f $PPP_OPTIONS ]; then
exit $SMF_EXIT_ERR_CONFIG
fi
SUCCESS=0
if [ ! "$?" = "1" ]; then
echo "sppp$UNIT" > $DSCP_IFNAME
SUCCESS=1
break
fi
done
exit $SMF_EXIT_ERR_FATAL
fi
# Wait for the DSCP link to come up, but only for 30 seconds
if [ $? -eq 0 ]; then
exit $SMF_EXIT_OK
fi
${SLEEP} 5
done
# Stop pppd before we return failure
${SLEEP} 1
rm -f $DSCP_IFNAME
exit $SMF_EXIT_ERR_FATAL
;;
'stop')
# First try SIGTERM and then SIGKILL
${SLEEP} 1
rm -f $DSCP_IFNAME
exit $SMF_EXIT_OK
;;
esac