#
# 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
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
#
# 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
# with the original arguments.
#
my $SVC_LP_SCHEDULER = 'print/server';
my $SVC_LP_LPD = 'print/rfc1179';
my $SVC_LP_IPP = 'print/ipp-listener';
my $SVC_LP_PPD = 'print/ppd-cache-update';
my $SVC_CUPS_SCHEDULER = 'cups/scheduler';
my $SVC_CUPS_LPD = 'cups/in-lpd';
print STDERR @_;
exit(1);
}
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);
}
my $FH;
}
my $FH;
}
}
my $service;
}
}
}
# CUPS has it's own names for enable and disable
}
}
my $EFH;
}
}
}
} else {
}
}
print " @_\n";
}
# store queue info in the 'active' print service
} elsif (/([^\s]+)\s(.+)/) {
$printer{$1} = $2;
my $value = $2;
# create a queue
}
}
}
}
# export old print queue configuration (if migrating)
}
print("disabling LP services...\n");
print("enabling CUPS services...\n");
} else {
print("disabling CUPS services...\n");
print("enabling LP services...\n");
}
# import the new print queue configuration (if migrating)
}
}
}
} else {
}
} else {
}
exit(0);