summaryrefslogtreecommitdiffstats
path: root/perl-install/printer.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2001-09-22 12:49:42 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2001-09-22 12:49:42 +0000
commita684aa131f8b64985934632b78d69d667a6b39f9 (patch)
tree768678bded65e62d891ecfa7ce764c0058bb79ff /perl-install/printer.pm
parentd0ef4689c2a5006e2cf3664ebc45a813dbfcc86b (diff)
downloaddrakx-a684aa131f8b64985934632b78d69d667a6b39f9.tar
drakx-a684aa131f8b64985934632b78d69d667a6b39f9.tar.gz
drakx-a684aa131f8b64985934632b78d69d667a6b39f9.tar.bz2
drakx-a684aa131f8b64985934632b78d69d667a6b39f9.tar.xz
drakx-a684aa131f8b64985934632b78d69d667a6b39f9.zip
Added support for automatic /dev/... file permissions setting by devfsd.
Diffstat (limited to 'perl-install/printer.pm')
-rw-r--r--perl-install/printer.pm18
1 files changed, 12 insertions, 6 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index e9ce0c908..e7f182517 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -109,6 +109,10 @@ sub set_default_spooler ($) {
sub set_permissions {
my ($file, $perms, $owner, $group) = @_;
+ # We only need to set the permissions during installation to be able to
+ # print test pages. After installation the devfsd daemon does the business
+ # automatically.
+ if (!$isInstall) {return 1;}
if ($owner && $group) {
run_program::rooted($prefix, "/bin/chown", "$owner.$group", $file)
|| die "Could not start chown!";
@@ -166,26 +170,28 @@ sub start_service_on_boot ($) {
}
sub SIGHUP_daemon {
- my ($spooler) = @_;
+ my ($service) = @_;
# PDQ has no daemon, exit.
- if ($spooler eq "pdq") {return 1};
+ if ($service eq "pdq") {return 1};
# CUPS needs auto-configuration
- if ($spooler eq "cups") {
+ if ($service eq "cups") {
run_program::rooted($prefix, "/usr/sbin/setcupsconfig");
}
# Name of the daemon
my $daemon;
- if (($spooler eq "lpr") || ($spooler eq "lpd") || ($spooler eq "lprng")) {
+ if (($service eq "lpr") || ($service eq "lpd") || ($service eq "lprng")) {
$daemon = "lpd";
- } elsif ($spooler eq "cups") {
+ } elsif ($service eq "cups") {
$daemon = "cupsd";
+ } elsif ($service eq "devfs") {
+ $daemon = "devfsd";
} else {
return 1;
}
# Send the SIGHUP
run_program::rooted($prefix, "/usr/bin/killall", "-HUP", $daemon);
# CUPS needs some time to come up.
- if ($spooler eq "cups") {
+ if ($service eq "cups") {
sleep 5;
}
return 1;