summaryrefslogtreecommitdiffstats
path: root/perl-install/printer.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2002-02-12 14:17:36 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2002-02-12 14:17:36 +0000
commit44aeeaea7bdfbfa081bdb6284955e0e286b5167d (patch)
treeee0350ae082ace17c720b21be743832e0b43c271 /perl-install/printer.pm
parent9f73e940171ad9e5bb54bac8ec6969cb1bd9d938 (diff)
downloaddrakx-44aeeaea7bdfbfa081bdb6284955e0e286b5167d.tar
drakx-44aeeaea7bdfbfa081bdb6284955e0e286b5167d.tar.gz
drakx-44aeeaea7bdfbfa081bdb6284955e0e286b5167d.tar.bz2
drakx-44aeeaea7bdfbfa081bdb6284955e0e286b5167d.tar.xz
drakx-44aeeaea7bdfbfa081bdb6284955e0e286b5167d.zip
Fixed:
- Endless loop when entering printerdrake during installation in recommended mode without local printer - Printerdrake was not closed when one was in the "Add Printer" sequence during installation and one clicked another installation item (entries on left hand side) - When configuring printing only after installation Printerdrake tried to check the installed queues without Foomatic being installed (bug was already in 8.1, but noone discovered it). - CUPS died when one tried to add a (local) printer in recommended mode after installation. - Improved text for the dialog telling that no local printer was detected. - The list of auto-detected printers appeared as drop-down menu and not as a list.
Diffstat (limited to 'perl-install/printer.pm')
-rw-r--r--perl-install/printer.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index 55920b7b3..9f606a686 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -125,6 +125,10 @@ sub set_permissions {
sub restart_service ($) {
my ($service) = @_;
+ # Exit silently if the service is not installed
+ if (!(-x "/etc/rc.d/init.d/$service")) {
+ return 1;
+ }
run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "restart");
if (($? >> 8) != 0) {
return 0;
@@ -139,6 +143,10 @@ sub restart_service ($) {
sub start_service ($) {
my ($service) = @_;
+ # Exit silently if the service is not installed
+ if (!(-x "/etc/rc.d/init.d/$service")) {
+ return 1;
+ }
run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "start");
if (($? >> 8) != 0) {
return 0;
@@ -153,6 +161,10 @@ sub start_service ($) {
sub stop_service ($) {
my ($service) = @_;
+ # Exit silently if the service is not installed
+ if (!(-x "/etc/rc.d/init.d/$service")) {
+ return 1;
+ }
run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "stop");
if (($? >> 8) != 0) {return 0;} else {return 1;}
}
@@ -183,6 +195,7 @@ sub start_service_on_boot ($) {
sub SIGHUP_daemon {
my ($service) = @_;
+ if ($service eq "cupsd") {$service = "cups"};
# PDQ has no daemon, exit.
if ($service eq "pdq") {return 1};
# CUPS needs auto-configuration