diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2001-09-22 12:49:42 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2001-09-22 12:49:42 +0000 |
commit | a684aa131f8b64985934632b78d69d667a6b39f9 (patch) | |
tree | 768678bded65e62d891ecfa7ce764c0058bb79ff /perl-install | |
parent | d0ef4689c2a5006e2cf3664ebc45a813dbfcc86b (diff) | |
download | drakx-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')
-rw-r--r-- | perl-install/printer.pm | 18 | ||||
-rw-r--r-- | perl-install/printerdrake.pm | 3 |
2 files changed, 15 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; diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 912edc4c6..c0520e486 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -1744,6 +1744,9 @@ sub install_spooler { printer::pdq_panic_button("add"); } } + # Give a SIGHUP to the devfsd daemon to correct the permissions + # for the /dev/... files according to the spooler + printer::SIGHUP_daemon("devfs"); } 1; } |