Lines Matching refs:service
28 # This program manages the "active" print service selection.
29 # If called as 'print-service', it takes one of four options.
31 # [-s[et] service [-m]] Select the "active" print service, optionally
33 # [-q[uery]] Display the "active" print service.
40 # under /usr/lib/{active-service}/bin/{command} and execute that program
75 $cmd [-s[et] service [-m]] Select the \"active\" print service,
78 $cmd [-q[uery]] Display the "active" print service.
117 my $service;
119 $service = svcprop("$SVC_CUPS_SCHEDULER:default", "general/active");
120 ($service =~ /true/) && ($service = 'cups') || ($service = 'lp');
122 return ($service);
127 my $service = print_service();
129 if (!defined($service)) {
130 fatal("failed to detect active print service: $!\n");
133 if (! -d "/usr/lib/$service/bin") {
134 fatal("print service: $service is not installed\n");
137 my $executable = "/usr/lib/$service/bin/$command";
139 ($command =~ /(en|dis)able/) && ($service eq 'cups') &&
141 ($executable = "/usr/lib/$service/bin/$service$command");
144 fatal("$command is not available from $service print service\n");
152 my $service = print_service();
154 if ($service eq 'lp') {
187 my $service = print_service();
190 # store queue info in the 'active' print service
205 ($service eq 'lp') &&
220 my ($service, $migrate) = @_;
223 if (! -d "/usr/lib/$service/bin") {
224 fatal("print service: $service is not installed\n");
234 if ($service eq 'cups') {
262 my $service = print_service();
264 if (!defined($service)) {
265 fatal("failed to detect active print service: $!\n");
267 print "active print service: $service\n";
270 if ($cmd eq 'print-service') {
273 my $res = GetOptions('q|query' => \$query, 's|set=s' => \$service,
280 !defined($query) && !defined($service) && !defined($migrate)) {
283 !defined($query) && !defined($service) && !defined($migrate)) {
286 defined($query) && !defined($service) && !defined($migrate)) {
289 !defined($query) && defined($service)) {
290 select_service($service, $migrate);