components/cups/Solaris/svc-cupsd
author Rich Burridge <rich.burridge@oracle.com>
Tue, 27 Nov 2012 13:29:17 -0800
changeset 1062 3e8044c3a700
parent 810 297dc5ace0d5
permissions -rw-r--r--
PSARC 2012/001 wdiff version 1.1.0 - GNU word comparison utility 15763917 SUNBT7126637 Latest wdiff should be included in Solaris 15415433 SUNBT6590729 pdiff depends on nonexistent wdiff,assumes diff is GNU diff

#!/usr/bin/ksh
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
#

#
# Standard prolog
#
. /lib/svc/share/smf_include.sh

if [ -z "$SMF_FMRI" ] ; then
	echo "SMF framework variables are not initialized."
	exit $SMF_EXIT_ERR_NOSMF
fi

# directory where to look for startup scripts
STARTUP=/usr/lib/cups/startup

# for all startup scripts found in the directory
for SCRIPT in $STARTUP/* ; do
	# verify the script is executable
	[ -x "$SCRIPT" ] || continue
	# execute the script
	if ! "$SCRIPT" "$SMF_FMRI" "startup/${SCRIPT##*/}" ; then
		echo "Warning: startup script $SCRIPT failed."
	fi
done

# execute the CUPS daemon
exec /usr/sbin/cupsd

# fatal error, failed to execute CUPS daemon
exit $SMF_EXIT_ERR_FATAL