svc-cupsd revision 860
860N/A#!/usr/bin/ksh
860N/A#
860N/A# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
860N/A#
860N/A
860N/A#
860N/A# Standard prolog
860N/A#
860N/A. /lib/svc/share/smf_include.sh
860N/A
860N/Aif [ -z "$SMF_FMRI" ] ; then
860N/A echo "SMF framework variables are not initialized."
860N/A exit $SMF_EXIT_ERR_NOSMF
860N/Afi
860N/A
860N/A# directory where to look for startup scripts
860N/ASTARTUP=/usr/lib/cups/startup
860N/A
860N/A# for all startup scripts found in the directory
860N/Afor SCRIPT in $STARTUP/* ; do
860N/A # verify the script is executable
860N/A [ -x "$SCRIPT" ] || continue
860N/A # execute the script
860N/A if ! "$SCRIPT" "$SMF_FMRI" "startup/${SCRIPT##*/}" ; then
860N/A echo "Warning: startup script $SCRIPT failed."
860N/A fi
860N/Adone
860N/A
860N/A# execute the CUPS daemon
860N/Aexec /usr/sbin/cupsd
860N/A
860N/A# fatal error, failed to execute CUPS daemon
860N/Aexit $SMF_EXIT_ERR_FATAL