summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/printerdrake.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2003-01-13 02:24:37 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2003-01-13 02:24:37 +0000
commita790b7b41860505b1ec38111052a55a4ec550dd9 (patch)
tree0889e814b393e9f82dc360c8bf8630d24833bb4c /perl-install/printer/printerdrake.pm
parentf5e5b03e0bbb7098bbe5941aaf7e5e0b6c00f7a7 (diff)
downloaddrakx-a790b7b41860505b1ec38111052a55a4ec550dd9.tar
drakx-a790b7b41860505b1ec38111052a55a4ec550dd9.tar.gz
drakx-a790b7b41860505b1ec38111052a55a4ec550dd9.tar.bz2
drakx-a790b7b41860505b1ec38111052a55a4ec550dd9.tar.xz
drakx-a790b7b41860505b1ec38111052a55a4ec550dd9.zip
Avoid unnecessary restarts of the CUPS daemon.
Diffstat (limited to 'perl-install/printer/printerdrake.pm')
-rw-r--r--perl-install/printer/printerdrake.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 8bcf98951..a7273d13c 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -67,6 +67,7 @@ sub config_cups {
# Read state for auto-correction of cupsd.conf
$printer->{cupsconfig}{autocorrection} =
printer::main::get_cups_autoconf();
+ my $oldautocorr = $printer->{cupsconfig}{autocorrection};
# Human-readable strings for hosts onto which the local printers
# are shared
my $maindone;
@@ -298,8 +299,11 @@ N("192.168.100.0/255.255.255.0\n")
$retvalue = 1;
$maindone = 1;
# Write state for auto-correction of cupsd.conf
- printer::main::set_cups_autoconf
- ($printer->{cupsconfig}{autocorrection});
+ if ($oldautocorr !=
+ $printer->{cupsconfig}{autocorrection}) {
+ printer::main::set_cups_autoconf
+ ($printer->{cupsconfig}{autocorrection});
+ }
# Write cupsd.conf
printer::main::write_cups_config($printer);
printer::main::write_cupsd_conf