summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacobs <none@none>2008-03-20 08:22:50 -0700
committerjacobs <none@none>2008-03-20 08:22:50 -0700
commit9622934a862fa39a8e90c816c4136e293d75629d (patch)
tree10ac023fd354cab0f883600b960eca87e1159324
parent992d2fac3dc901c4124d4042925692f74fb6dd88 (diff)
downloadillumos-joyent-9622934a862fa39a8e90c816c4136e293d75629d.tar.gz
6664617 Print services should be more selectable
-rw-r--r--usr/src/cmd/print/Makefile3
-rw-r--r--usr/src/cmd/print/bsd-sysv-commands/Makefile18
-rw-r--r--usr/src/cmd/print/scripts/Makefile17
-rw-r--r--usr/src/cmd/print/selector/Makefile54
-rwxr-xr-xusr/src/cmd/print/selector/print-service288
-rw-r--r--usr/src/cmd/svc/profile/generic_limited_net.xml3
-rw-r--r--usr/src/cmd/svc/profile/generic_open.xml6
-rw-r--r--usr/src/cmd/svc/shell/netservices.sh53
-rw-r--r--usr/src/pkgdefs/SUNWlp-cmds/prototype_com24
-rw-r--r--usr/src/pkgdefs/SUNWlpr-cmds/prototype_com10
-rw-r--r--usr/src/pkgdefs/SUNWpcu/Makefile3
-rw-r--r--usr/src/pkgdefs/SUNWpcu/prototype_com8
-rw-r--r--usr/src/pkgdefs/SUNWpsu/depend8
-rw-r--r--usr/src/pkgdefs/SUNWpsu/prototype_com27
14 files changed, 457 insertions, 65 deletions
diff --git a/usr/src/cmd/print/Makefile b/usr/src/cmd/print/Makefile
index a59457125a..c22b11279c 100644
--- a/usr/src/cmd/print/Makefile
+++ b/usr/src/cmd/print/Makefile
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -38,6 +38,7 @@ PRINT_SUBDIRS = \
conv_fix \
printer-info \
ppdmgr \
+ selector \
bsd-sysv-commands
SUBDIRS = $(PRINT_SUBDIRS) $(JAVA_SUBDIRS)
diff --git a/usr/src/cmd/print/bsd-sysv-commands/Makefile b/usr/src/cmd/print/bsd-sysv-commands/Makefile
index 6599510e04..d4ec13c448 100644
--- a/usr/src/cmd/print/bsd-sysv-commands/Makefile
+++ b/usr/src/cmd/print/bsd-sysv-commands/Makefile
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -29,16 +29,21 @@ include ../Makefile.sp
UCBPROGS = lpr lpq lprm lpc
BINPROGS = lp lpstat cancel enable disable $(UCBPROGS)
-
SBINPROGS = accept reject lpmove
+
LIBPRINTPROGS = in.lpd
+LIBLPPROGS = $(BINPROGS) $(SBINPROGS)
+
OBJS = $(BINPROGS:=.o) $(SBINPROGS:=.o) $(LIBPRINTPROGS:=.o) common.o
+ROOTLIBLPBIN=$(ROOTLIBLP)/bin
+
ROOTBINPROGS = $(BINPROGS:%=$(ROOTBIN)/%)
ROOTUSRSBINPROGS = $(SBINPROGS:%=$(ROOTUSRSBIN)/%)
ROOTLIBPRINTPROGS = $(LIBPRINTPROGS:%=$(ROOTLIBPRINT)/%)
+ROOTLIBLPPROGS = $(LIBLPPROGS:%=$(ROOTLIBLPBIN)/%)
FILEMODE = 0555
@@ -58,6 +63,8 @@ LDLIBS += -lpapi -lc
in.lpd:= CFLAGS += -DSOLARIS_PRIVATE_POST_0_9
in.lpd:= LDLIBS += -lnsl -lsocket
+all: $(BINPROGS) $(SBINPROGS)
+
# each program needs common.o as well
$(BINPROGS) $(SBINPROGS) $(LIBPRINTPROGS): $(BINPROGS:%=%.c) $(SBINPROGS:%=%.c) $(LIBPRINTPROGS:%=%.c) common.o
$(LINK.c) -o $@ $@.c common.o $(LDLIBS)
@@ -68,6 +75,9 @@ ROOTUSRUCB = $(ROOT)/usr/ucb
ROOTUCBSYMLINKS = $(UCBPROGS:%=$(ROOTUSRUCB)/%)
$(ROOTUSRUCB)/%: $(ROOTUSRUCB) %
+$(ROOTLIBLPBIN)/%: %
+ $(INS.file)
+
$(ROOTUCBSYMLINKS):
$(RM) $@; $(SYMLINK) ../bin/$(@F) $@
@@ -80,9 +90,7 @@ $(ROOTUSRLIBSYMLINKS):
.KEEP_STATE:
-all: $(BINPROGS) $(SBINPROGS)
-
-install: $(BINPROGS) $(SBINPROGS) $(ROOTBINPROGS) $(ROOTUSRSBINPROGS) \
+install: $(ROOTLIBLPPROGS) \
$(ROOTLIBPRINT) $(ROOTLIBPRINTPROGS) $(ROOTMANIFEST) \
$(ROOTUCBSYMLINKS) $(ROOTUSRLIBSYMLINKS)
diff --git a/usr/src/cmd/print/scripts/Makefile b/usr/src/cmd/print/scripts/Makefile
index 46ffe5cadc..27e14fb517 100644
--- a/usr/src/cmd/print/scripts/Makefile
+++ b/usr/src/cmd/print/scripts/Makefile
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -50,7 +50,7 @@ ROOTLIBPRINTPROG= $(PROG:%=$(ROOTPRINTLIB)/%)
$(ROOTLIBPRINTPROG) := FILEMODE=0555
$(ROOTPRINTLIB)/Makefile.yp := FILEMODE=0444
-USRSBINPROG= lpsystem lpadmin ppdmgr
+USRSBINPROG= lpsystem ppdmgr
ROOTUSRSBINPROG= $(USRSBINPROG:%=$(ROOTUSRSBIN)/%)
$(ROOTUSRSBINPROG) := FILEMODE=555
@@ -66,11 +66,12 @@ $(ROOTMANUFALIASES) := OWNER=root
$(ROOTMANUFALIASES) := GROUP=lp
$(ROOTMANUFALIASES) := FILEMODE=444
-PPDPROGS= getmakes getmodels getppdfile getppds ppdfilename2mmp
-ROOTPPDPROGS= $(PPDPROGS:%=$(ROOTLIBLPBIN)/%)
-$(ROOTPPDPROGS) := OWNER=root
-$(ROOTPPDPROGS) := GROUP=lp
-$(ROOTPPDPROGS) := FILEMODE=555
+LIBLPPROGS= getmakes getmodels getppdfile getppds ppdfilename2mmp \
+ lpadmin
+ROOTLIBLPPROGS= $(LIBLPPROGS:%=$(ROOTLIBLPBIN)/%)
+$(ROOTLIBLPPROGS) := OWNER=root
+$(ROOTLIBLPPROGS) := GROUP=lp
+$(ROOTLIBLPPROGS) := FILEMODE=555
LIBLINKS= $(ROOTLIB)/lpadmin $(ROOTLIB)/lpsystem
@@ -121,7 +122,7 @@ install: $(ROOTLNKPROGS) \
$(ROOTLIBPRINTPROG) $(ROOTSTARTPROG) \
$(ROOTUSRSBIN) $(ROOTUSRSBINPROG) \
$(ROOTVARSPOOLPRINT) $(ROOTPCONF) \
- $(ROOTPPDPROGS) $(LIBLINKS) \
+ $(ROOTLIBLPPROGS) $(LIBLINKS) \
$(ROOTVARLP) $(ROOTVARLPPPD) \
$(ROOTMANUFALIASES)
diff --git a/usr/src/cmd/print/selector/Makefile b/usr/src/cmd/print/selector/Makefile
new file mode 100644
index 0000000000..b3ea9e94a2
--- /dev/null
+++ b/usr/src/cmd/print/selector/Makefile
@@ -0,0 +1,54 @@
+#
+# 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
+# or http://www.opensolaris.org/os/licensing.
+# 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
+#
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../../Makefile.cmd
+
+SBINPROG = print-service
+LPBINLINKS = lp lpstat cancel enable disable
+LPRBINLINKS = lpr lpq lprm lpc
+BINLINKS = $(LPBINLINKS) $(LPRBINLINKS)
+SBINLINKS = accept reject lpmove lpadmin
+
+ROOTUSRSBINPROG = $(SBINPROG:%=$(ROOTUSRSBIN)/%)
+ROOTUSRBINLINKS = $(BINLINKS:%=$(ROOTBIN)/%)
+ROOTUSRSBINLINKS = $(SBINLINKS:%=$(ROOTUSRSBIN)/%)
+
+FILEMODE = 0555
+OWNER = root
+
+$(ROOTUSRBINLINKS):
+ $(RM) $@; $(SYMLINK) ../sbin/$(SBINPROG) $@
+
+$(ROOTUSRSBINLINKS):
+ $(RM) $@; $(SYMLINK) $(SBINPROG) $@
+
+.KEEP_STATE:
+
+all check clean clobber lint:
+
+install: $(ROOTUSRSBINPROG) $(ROOTUSRBINLINKS) $(ROOTUSRSBINLINKS)
+
diff --git a/usr/src/cmd/print/selector/print-service b/usr/src/cmd/print/selector/print-service
new file mode 100755
index 0000000000..c2857a9a43
--- /dev/null
+++ b/usr/src/cmd/print/selector/print-service
@@ -0,0 +1,288 @@
+#!/usr/perl5/bin/perl
+#
+# 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
+# or http://www.opensolaris.org/os/licensing.
+# 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
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+#
+# This program manages the "active" print service selection.
+# If called as 'print-service', it takes one of four options.
+# Options:
+# [-s[et] service [-m]] Select the "active" print service, optionally
+# migrating basic print queue configuration.
+# [-q[uery]] Display the "active" print service.
+# [-e[xport] file] Export basic print queue configuration to
+# a file.
+# [-i[mport] file] Import basic print queue configuration from
+# a file.
+#
+# If called by any other name, it will look for a corresponding command
+# under /usr/lib/{active-service}/bin/{command} and execute that program
+# with the original arguments.
+#
+
+use Getopt::Long;
+use File::Basename;
+use File::Copy;
+use File::Temp qw/ :POSIX /;
+
+my $cmd = basename($0);
+
+my $LPSTAT = '/usr/bin/lpstat';
+my $LPADMIN = '/usr/sbin/lpadmin';
+my $ENABLE = '/usr/bin/enable';
+my $ACCEPT = '/usr/sbin/accept';
+my $SVCADM = '/usr/sbin/svcadm';
+my $SVCPROP = '/usr/bin/svcprop';
+my $SVCCFG = '/usr/sbin/svccfg';
+my $SVC_LP_SCHEDULER = 'print/server';
+my $SVC_LP_LPD = 'print/rfc1179';
+my $SVC_LP_IPP = 'print/ipp-listener';
+my $SVC_CUPS_SCHEDULER = 'cups/scheduler';
+my $SVC_CUPS_LPD = 'cups/in-lpd';
+
+sub fatal {
+ print STDERR @_;
+ exit(1);
+}
+
+sub usage {
+ print STDERR <<EOF ;
+Usage:
+ $cmd [-s[et] service [-m]] Select the \"active\" print service,
+ optionally migrating basic print queue
+ configuration.
+ $cmd [-q[uery]] Display the "active" print service.
+ $cmd [-e[xport] file] Export basic print queue configuration
+ to a file.
+ $cmd [-i[mport] file] Import basic print queue configuration
+ from a file.
+EOF
+ exit(1);
+}
+
+sub svcprop {
+ local ($fmri, $property) = @_;
+ my $FH;
+
+ open($FH, "$SVCPROP -C -p $property $fmri 2>/dev/null |");
+ $result = <$FH>;
+ close($FH);
+
+ return ($result);
+}
+
+sub svccfg {
+ local ($fmri, $operation) = @_;
+ my $FH;
+
+ open($FH, "$SVCCFG -s $fmri \"$operation\" 2>/dev/null |");
+ $result = <$FH>;
+ close($FH);
+
+ return ($result);
+}
+
+sub svcadm {
+ local ($operation, @fmris) = @_;
+
+ system("$SVCADM $operation -s @fmris");
+}
+
+
+sub print_service {
+ my $service;
+
+ $service = svcprop("$SVC_CUPS_SCHEDULER:default", "general/active");
+ ($service =~ /true/) && ($service = 'cups') || ($service = 'lp');
+
+ return ($service);
+}
+
+sub print_command {
+ local($command, @av) = @_;
+ my $service = print_service();
+
+ if (!defined($service)) {
+ fatal("failed to detect active print service: $!\n");
+ }
+
+ if (! -d "/usr/lib/$service/bin") {
+ fatal("print service: $service is not installed\n");
+ }
+
+ my $executable = "/usr/lib/$service/bin/$command";
+ # CUPS has it's own names for enable and disable
+ ($command =~ /(en|dis)able/) && ($service eq 'cups') &&
+ (! -x $executable) &&
+ ($executable = "/usr/lib/$service/bin/$service$command");
+
+ if (! -x $executable) {
+ fatal("$command is not available from $service print service\n");
+ }
+
+ exec($executable, @ARGV);
+}
+
+sub export_print_queues {
+ local ($path) = @_;
+ my $service = print_service();
+
+ if ($service eq 'lp') {
+ my $FH, $DFH;
+
+ open($FH, ">$path");
+ open($DFH, "$LPSTAT -v|");
+ while (<$DFH>) {
+ if (/device for (.+): (.+)/) {
+ my $EFH;
+
+ print $FH "<Printer $1>\nDeviceURI $2\n";
+ open($EFH, "$LPSTAT -p $1 -l |");
+ while (<$EFH>) {
+ (/Description: (.+)/) &&
+ print $FH "Info $1\n";
+ }
+ close($EFH);
+ print $FH "</Printer>\n";
+ }
+ }
+ close($DFH);
+ close($FH);
+ } else {
+ copy('/etc/cups/printers.conf', $path);
+ }
+}
+
+sub psystem {
+ print " @_\n";
+ system(@_);
+}
+
+sub import_print_queues {
+ local ($path) = @_;
+ my $service = print_service();
+ my $FH, %printer, @options;
+
+ # store queue info in the 'active' print service
+ open($FH, "<$path");
+ while (<$FH>) {
+ if (/<Printer (.+)>/) {
+ $printer{'Printer'} = $1;
+ @options = ();
+ push(@options, "-p", $1);
+ } elsif (/([^\s]+)\s(.+)/) {
+ $printer{$1} = $2;
+ my $value = $2;
+ ($1 eq 'DeviceURI') &&
+ push(@options, "-v", $value);
+ ($1 eq 'Info') &&
+ push(@options, "-D", $value);
+ } elsif (/<\/Printer>/) {
+ ($service eq 'lp') &&
+ push(@options, "-m", "uri");
+ print "importing $printer{'Printer'}...\n";
+ # create a queue
+ psystem($LPADMIN, @options);
+ psystem($ENABLE, $printer{'Printer'});
+ ($printer{'Accepting'} eq 'Yes') &&
+ psystem($ACCEPT, $printer{'Printer'});
+ $printer = ();
+ }
+ }
+ close($FH);
+}
+
+sub select_service {
+ my ($service, $migrate) = @_;
+ my $FH, $queues;
+
+ if (! -d "/usr/lib/$service/bin") {
+ fatal("print service: $service is not installed\n");
+ }
+
+ if ($migrate == 1) {
+ # export old print queue configuration (if migrating)
+ $queues = tmpnam();
+ export_print_queues($queues);
+ }
+
+ # enable/disable the services
+ if ($service eq 'cups') {
+ print("disabling LP services...\n");
+ svcadm("disable", $SVC_LP_SCHEDULER, $SVC_LP_IPP, $SVC_LP_LPD);
+ print("enabling CUPS services...\n");
+ svcadm("enable", $SVC_CUPS_SCHEDULER, $SVC_CUPS_LPD);
+ svccfg("cups/scheduler:default",
+ "setprop general/active = boolean: true");
+ } else {
+ print("disabling CUPS services...\n");
+ svcadm("disable", $SVC_CUPS_SCHEDULER, $SVC_CUPS_LPD);
+ print("enabling LP services...\n");
+ svcadm("enable", $SVC_LP_SCHEDULER, $SVC_LP_IPP, $SVC_LP_LPD);
+ svccfg("cups/scheduler:default", "delprop general/active");
+ }
+
+ # import the new print queue configuration (if migrating)
+ defined($queues) && import_print_queues($queues);
+}
+
+sub query_service {
+ my $service = print_service();
+
+ if (!defined($service)) {
+ fatal("failed to detect active print service: $!\n");
+ }
+ print "active print service: $service\n";
+}
+
+if ($cmd eq 'print-service') {
+ my ($import_path, $export_path, $svc_name, $query, $migrate) = ();
+
+ my $res = GetOptions('q|query' => \$query, 's|set=s' => \$service,
+ 'm|migrate' => \$migrate, 'e|export=s' => \$export_path,
+ 'i|import=s' => \$import_path);
+
+ ($res) || usage();
+
+ if (defined($import_path) && !defined($export_path) &&
+ !defined($query) && !defined($service) && !defined($migrate)) {
+ import_print_queues($import_path);
+ } elsif (!defined($import_path) && defined($export_path) &&
+ !defined($query) && !defined($service) && !defined($migrate)) {
+ export_print_queues($export_path);
+ } elsif (!defined($import_path) && !defined($export_path) &&
+ defined($query) && !defined($service) && !defined($migrate)) {
+ query_service();
+ } elsif (!defined($import_path) && !defined($export_path) &&
+ !defined($query) && defined($service)) {
+ select_service($service, $migrate);
+ } else {
+ usage();
+ }
+} else {
+ print_command($cmd, @ARGV);
+}
+
+exit(0);
diff --git a/usr/src/cmd/svc/profile/generic_limited_net.xml b/usr/src/cmd/svc/profile/generic_limited_net.xml
index d5ad61ace8..e3f9c81297 100644
--- a/usr/src/cmd/svc/profile/generic_limited_net.xml
+++ b/usr/src/cmd/svc/profile/generic_limited_net.xml
@@ -183,6 +183,9 @@
<service name='application/print/rfc1179' version='1' type='service'>
<instance name='default' enabled='false' />
</service>
+ <service name='application/cups/in-lpd' version='1' type='service'>
+ <instance name='default' enabled='false' />
+ </service>
<service name='application/stosreg' version='1' type='service'>
<instance name='default' enabled='true' />
</service>
diff --git a/usr/src/cmd/svc/profile/generic_open.xml b/usr/src/cmd/svc/profile/generic_open.xml
index a9eeaa3315..0e86713e19 100644
--- a/usr/src/cmd/svc/profile/generic_open.xml
+++ b/usr/src/cmd/svc/profile/generic_open.xml
@@ -145,15 +145,9 @@
<service name='application/management/wbem' version='1' type='service'>
<instance name='default' enabled='true' />
</service>
- <service name='application/print/ipp-listener' version='1' type='service'>
- <instance name='default' enabled='true' />
- </service>
<service name='application/print/ppd-cache-update' version='1' type='service'>
<instance name='default' enabled='true' />
</service>
- <service name='application/print/rfc1179' version='1' type='service'>
- <instance name='default' enabled='true' />
- </service>
<service name='application/stosreg' version='1' type='service'>
<instance name='default' enabled='true' />
</service>
diff --git a/usr/src/cmd/svc/shell/netservices.sh b/usr/src/cmd/svc/shell/netservices.sh
index 548b49acc0..02035b8544 100644
--- a/usr/src/cmd/svc/shell/netservices.sh
+++ b/usr/src/cmd/svc/shell/netservices.sh
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -34,6 +34,8 @@ XSERVER_FMRI=svc:/application/x11/x11-server
SENDMAIL_FMRI=svc:/network/smtp:sendmail
PRINTSERVER_FMRI=svc:/application/print/server
RFC1179_FMRI=svc:/application/print/rfc1179
+CUPSSERVER_FMRI=svc:/application/cups/scheduler
+CUPSRFC1179_FMRI=svc:/application/cups/in-lpd
IPPLISTENER_FMRI=svc:/application/print/ipp-listener
TTDB_FMRI=svc:/network/rpc/cde-ttdbserver
DTLOGIN_FMRI=svc:/application/graphical-login/cde-login
@@ -206,6 +208,43 @@ set_smcwbem() {
svcadm refresh $SMCWBEM_FMRI
}
+set_printing() {
+ use_cups=`svcprop -C -p general/active $CUPSSERVER_FMRI:default \
+ 2>/dev/null`
+
+ case "$1" in
+ "open")
+ cups_options="--remote-admin --remote-printers"
+ cups_options="$cups_options --share-printers --remote-any"
+ svc_operation="enable"
+ ;;
+ "local")
+ cups_options="--no-remote-admin --no-remote-printers"
+ cups_options="$cups_options --no-share-printers --no-remote-any"
+ svc_operation="disable"
+ ;;
+ esac
+
+ case "$use_cups" in
+ "true")
+ if [ -x /usr/sbin/cupsctl ] ; then
+ # only run cupsctl with elevated privilege to avoid
+ # being prompted for a password
+ [ `/usr/bin/id -u` = 0 ] &&
+ /usr/sbin/cupsctl $cups_options
+ fi
+ svcadm $svc_operation $CUPSRFC1179_FMRI
+ ;;
+ *)
+ if [ "`svcprop -p restarter/state $PRINTSERVER_FMRI:default`" \
+ != "disabled" ] ; then
+ svcadm $svc_operation $RFC1179_FMRI:default
+ svcadm $svc_operation $IPPLISTENER_FMRI:default
+ fi
+ ;;
+ esac
+}
+
if [ $# -ne 1 ]; then
usage
fi
@@ -241,6 +280,7 @@ set_ttdbserver $keyword
set_dtlogin $keyword
set_webconsole $keyword
set_smcwbem $keyword
+set_printing $keyword
#
# put the new profile into place, and apply it
@@ -251,17 +291,6 @@ if [ $profile = "generic_open.xml" ]
then
# generic_open may not start inetd services on upgraded systems
svccfg apply /var/svc/profile/inetd_generic.xml
-
- # disable rfc1179 and ipp-listener services if server is disabled
- if [ "`svcprop -p restarter/state $PRINTSERVER_FMRI:default`" = \
- "disabled" ]
- then
- # need restart since refresh won't pick up new command-line
- echo "print/server not enabled: disabling print/rfc1779"
- svcadm disable $RFC1179_FMRI:default
- echo "print/server not enabled: disabling print/ipp-listener"
- svcadm disable $IPPLISTENER_FMRI:default
- fi
fi
#
diff --git a/usr/src/pkgdefs/SUNWlp-cmds/prototype_com b/usr/src/pkgdefs/SUNWlp-cmds/prototype_com
index 08613b5ab5..5d09fea16e 100644
--- a/usr/src/pkgdefs/SUNWlp-cmds/prototype_com
+++ b/usr/src/pkgdefs/SUNWlp-cmds/prototype_com
@@ -21,7 +21,7 @@
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -48,17 +48,13 @@ i depend
# SUNWpapi-lp-cmds
#
d none usr 755 root sys
-d none usr/bin 755 root bin
-f none usr/bin/cancel 0555 root bin
-f none usr/bin/disable 0555 root bin
-f none usr/bin/enable 0555 root bin
-f none usr/bin/lp 0555 root bin
-f none usr/bin/lpstat 0555 root bin
-d none usr/lib 755 root bin
-s none usr/lib/accept=../sbin/accept
-s none usr/lib/lpmove=../sbin/lpmove
-s none usr/lib/reject=../sbin/reject
+d none usr/bin 755 root bin
+s none usr/bin/cancel=../sbin/print-service
+s none usr/bin/disable=../sbin/print-service
+s none usr/bin/enable=../sbin/print-service
+s none usr/bin/lp=../sbin/print-service
+s none usr/bin/lpstat=../sbin/print-service
d none usr/sbin 755 root bin
-f none usr/sbin/accept 0555 root bin
-f none usr/sbin/lpmove 0555 root bin
-f none usr/sbin/reject 0555 root bin
+s none usr/sbin/accept=./print-service
+s none usr/sbin/lpmove=./print-service
+s none usr/sbin/reject=./print-service
diff --git a/usr/src/pkgdefs/SUNWlpr-cmds/prototype_com b/usr/src/pkgdefs/SUNWlpr-cmds/prototype_com
index 124d7c7480..c6994812d6 100644
--- a/usr/src/pkgdefs/SUNWlpr-cmds/prototype_com
+++ b/usr/src/pkgdefs/SUNWlpr-cmds/prototype_com
@@ -20,7 +20,7 @@
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -47,7 +47,7 @@ i depend
#
d none usr 755 root sys
d none usr/bin 755 root bin
-f none usr/bin/lpc 0555 root bin
-f none usr/bin/lpq 0555 root bin
-f none usr/bin/lpr 0555 root bin
-f none usr/bin/lprm 0555 root bin
+s none usr/bin/lpc=../sbin/print-service
+s none usr/bin/lpq=../sbin/print-service
+s none usr/bin/lpr=../sbin/print-service
+s none usr/bin/lprm=../sbin/print-service
diff --git a/usr/src/pkgdefs/SUNWpcu/Makefile b/usr/src/pkgdefs/SUNWpcu/Makefile
index 13b1c681aa..9e8f55a682 100644
--- a/usr/src/pkgdefs/SUNWpcu/Makefile
+++ b/usr/src/pkgdefs/SUNWpcu/Makefile
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -34,6 +34,7 @@ ACTION=grep SUNWpcr depend > /dev/null || \
( chmod 666 depend; \
echo "P SUNWpcr Solaris Print - Client, (root)" >> depend; \
echo "P SUNWpapi Free Standards Group Open Printing API" >> depend; \
+ echo "P SUNWperl584core SUNWperl584core Perl 5.8.4 (core)" >> depend; \
echo "I SUNWlpu LP Print Service, (usr)" >> depend; \
chmod 444 depend );
diff --git a/usr/src/pkgdefs/SUNWpcu/prototype_com b/usr/src/pkgdefs/SUNWpcu/prototype_com
index dbbac2b647..32ae3a6769 100644
--- a/usr/src/pkgdefs/SUNWpcu/prototype_com
+++ b/usr/src/pkgdefs/SUNWpcu/prototype_com
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -50,8 +50,6 @@ f none usr/bin/lptest 555 root lp
d none usr/lib 0755 root bin
f none usr/lib/libprint.so.2 0755 root bin
s none usr/lib/libprint.so=./libprint.so.2
-s none usr/lib/lpadmin=../sbin/lpadmin
-s none usr/lib/lpsystem=../sbin/lpsystem
d none usr/lib/print 0755 root lp
f none usr/lib/print/Makefile.yp 0444 root lp
f none usr/lib/print/in.lpd 0555 root bin
@@ -59,5 +57,5 @@ f none usr/lib/print/conv_fix 0555 root lp
f none usr/lib/print/conv_lp 0555 root lp
f none usr/lib/print/conv_lpd 0555 root lp
d none usr/sbin 0755 root bin
-f none usr/sbin/lpadmin 0555 root lp
-f none usr/sbin/lpsystem 0555 root lp
+s none usr/sbin/lpadmin=./print-service
+f none usr/sbin/print-service 0555 root bin
diff --git a/usr/src/pkgdefs/SUNWpsu/depend b/usr/src/pkgdefs/SUNWpsu/depend
index e77a4dcb84..69ace39ddf 100644
--- a/usr/src/pkgdefs/SUNWpsu/depend
+++ b/usr/src/pkgdefs/SUNWpsu/depend
@@ -1,13 +1,12 @@
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# 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
# or http://www.opensolaris.org/os/licensing.
@@ -52,5 +51,6 @@ P SUNWcsd Core Solaris Devices
P SUNWcsl Core Solaris Libraries
P SUNWpcu Solaris Print - Client, (usr)
P SUNWpsr Solaris Print - LP Server, (root)
+P SUNWpapi Free Standards Group Open Printing API
I SUNWlpu LP Print Service, (usr)
I SUNWlps LP Print Service, server
diff --git a/usr/src/pkgdefs/SUNWpsu/prototype_com b/usr/src/pkgdefs/SUNWpsu/prototype_com
index 9f4b8baf2c..d078e2ab01 100644
--- a/usr/src/pkgdefs/SUNWpsu/prototype_com
+++ b/usr/src/pkgdefs/SUNWpsu/prototype_com
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -48,13 +48,26 @@ d none usr/lib 755 root bin
f none usr/lib/lpsched 555 root lp
d none usr/lib/lp 755 root lp
d none usr/lib/lp/bin 755 root lp
+f none usr/lib/lp/bin/accept 0555 root bin
f none usr/lib/lp/bin/alert.proto 444 root lp
+f none usr/lib/lp/bin/cancel 0555 root bin
+f none usr/lib/lp/bin/disable 0555 root bin
f none usr/lib/lp/bin/drain.output 555 root lp
+f none usr/lib/lp/bin/enable 0555 root bin
+f none usr/lib/lp/bin/lp 0555 root bin
f none usr/lib/lp/bin/lp.cat 555 root lp
f none usr/lib/lp/bin/lp.set 555 root lp
f none usr/lib/lp/bin/lp.tell 555 root lp
-f none usr/lib/lp/bin/slow.filter 555 root lp
+f none usr/lib/lp/bin/lpadmin 0555 root bin
+f none usr/lib/lp/bin/lpc 0555 root bin
+f none usr/lib/lp/bin/lpmove 0555 root bin
+f none usr/lib/lp/bin/lpq 0555 root bin
+f none usr/lib/lp/bin/lpr 0555 root bin
+f none usr/lib/lp/bin/lprm 0555 root bin
+f none usr/lib/lp/bin/lpstat 0555 root bin
f none usr/lib/lp/bin/netpr 4511 root bin
+f none usr/lib/lp/bin/reject 0555 root bin
+f none usr/lib/lp/bin/slow.filter 555 root lp
d none usr/lib/lp/model 755 root lp
f none usr/lib/lp/model/standard 555 root lp
f none usr/lib/lp/model/netstandard 555 root lp
@@ -64,17 +77,23 @@ d none usr/lib/lp/local 755 root lp
f none usr/lib/lp/local/lpsched 555 root lp
f none usr/lib/lp/local/lpadmin 555 root lp
f none usr/lib/lp/local/lpshut 555 root lp
-# links maintianed for convenience
+# links maintained for backward compatibility
+s none usr/lib/accept=../sbin/accept
+s none usr/lib/lpadmin=../sbin/lpadmin
s none usr/lib/lpfilter=../sbin/lpfilter
s none usr/lib/lpforms=../sbin/lpforms
+s none usr/lib/lpmove=../sbin/lpmove
s none usr/lib/lpusers=../sbin/lpusers
s none usr/lib/lpshut=../sbin/lpshut
+s none usr/lib/lpsystem=../sbin/lpsystem
+s none usr/lib/reject=../sbin/reject
# lp specific admin commands
d none usr/sbin 755 root bin
f none usr/sbin/lpfilter 555 root lp
f none usr/sbin/lpforms 555 root lp
-f none usr/sbin/lpusers 555 root lp
f none usr/sbin/lpshut 555 root lp
+f none usr/sbin/lpsystem 0555 root lp
+f none usr/sbin/lpusers 555 root lp
# PAPI lpsched service module
d none usr/lib/print 0755 root lp
f none usr/lib/print/psm-lpsched.so.1 0755 root lp