From 44aeeaea7bdfbfa081bdb6284955e0e286b5167d Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Tue, 12 Feb 2002 14:17:36 +0000 Subject: 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. --- perl-install/printer.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'perl-install/printer.pm') 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 -- cgit v1.2.1