summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/printer.pm6
-rw-r--r--perl-install/printerdrake.pm8
2 files changed, 14 insertions, 0 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index 454909cda..4bc8962f3 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -223,6 +223,12 @@ sub set_alternative {
return 1;
}
+sub pdq_panic_button {
+ my $setting = @_[0];
+ run_program::rooted($prefix, "/usr/sbin/pdqpanicbutton", "--$setting")
+ || die "Could not $setting PDQ panic buttons!";
+}
+
sub copy_printer_params($$) {
my ($from, $to) = @_;
map { $to->{$_} = $from->{$_} } grep { $_ ne 'configured' } keys %$from;
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index 89f44061d..fbe5ca831 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -1429,6 +1429,8 @@ sub install_spooler {
printer::set_alternative("cancel","/usr/bin/cancel-cups");
printer::set_alternative("lpstat","/usr/bin/lpstat-cups");
printer::set_alternative("lpc","/usr/sbin/lpc-cups");
+ # Remove PDQ panic buttons from the user's KDE Desktops
+ printer::pdq_panic_button("remove");
} elsif ($printer->{SPOOLER} eq "lpd") {
# "lpr" conflicts with "LPRng", remove "LPRng"
if ((!$::testing) &&
@@ -1454,6 +1456,8 @@ sub install_spooler {
printer::set_alternative("lpq","/usr/bin/lpq-lpd");
printer::set_alternative("lprm","/usr/bin/lprm-lpd");
printer::set_alternative("lpc","/usr/sbin/lpc-lpd");
+ # Remove PDQ panic buttons from the user's KDE Desktops
+ printer::pdq_panic_button("remove");
} elsif ($printer->{SPOOLER} eq "lprng") {
# "LPRng" conflicts with "lpr", remove "lpr"
if ((!$::testing) &&
@@ -1482,6 +1486,8 @@ sub install_spooler {
printer::set_alternative("cancel","/usr/bin/cancel-lpd");
printer::set_alternative("lpstat","/usr/bin/lpstat-lpd");
printer::set_alternative("lpc","/usr/sbin/lpc-lpd");
+ # Remove PDQ panic buttons from the user's KDE Desktops
+ printer::pdq_panic_button("remove");
} elsif ($printer->{SPOOLER} eq "pdq") {
if ((!$::testing) &&
(!printer::files_exist((qw(/usr/bin/pdq
@@ -1494,6 +1500,8 @@ sub install_spooler {
printer::set_alternative("lpr","/usr/bin/lpr-pdq");
printer::set_alternative("lpq","/usr/bin/lpq-foomatic");
printer::set_alternative("lprm","/usr/bin/lprm-foomatic");
+ # Add PDQ panic buttons to the user's KDE Desktops
+ printer::pdq_panic_button("add");
}
}
1;