6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# CDDL HEADER START
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# The contents of this file are subject to the terms of the
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# Common Development and Distribution License (the "License").
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# You may not use this file except in compliance with the License.
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# See the License for the specific language governing permissions
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# and limitations under the License.
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# When distributing Covered Code, include this CDDL HEADER in each
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# If applicable, add the following below this CDDL HEADER, with the
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# fields enclosed by brackets "[]" replaced with your own identifying
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# information: Portions Copyright [yyyy] [name of copyright owner]
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# CDDL HEADER END
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo# Use is subject to license terms.
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo open($FH, "$SVCPROP -C -p $property $fmri 2>/dev/null |");
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo $service = svcprop("$SVC_CUPS_SCHEDULER:default", "general/active");
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo ($service =~ /true/) && ($service = 'cups') || ($service = 'lp');
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo system("pkill -f '/system-config-printer/applet.py'");
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo exec('/usr/lib/lp/bin/desktop-print-management-applet');
6124874e2cec65f2e7a974b3833b05dbf2a7d905Ghee Teo exec('/usr/lib/cups/bin/desktop-print-management-applet');