summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-11-12 12:05:40 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-11-12 12:05:40 +0000
commit046406ab6b13659f4be843d3d2d5639efaf425fe (patch)
tree2304d9911b495ea5262815f2b3cca305f53d83f4
parent57582cf77904240eee6c29874866b9d62e4a9951 (diff)
downloaddrakx-046406ab6b13659f4be843d3d2d5639efaf425fe.tar
drakx-046406ab6b13659f4be843d3d2d5639efaf425fe.tar.gz
drakx-046406ab6b13659f4be843d3d2d5639efaf425fe.tar.bz2
drakx-046406ab6b13659f4be843d3d2d5639efaf425fe.tar.xz
drakx-046406ab6b13659f4be843d3d2d5639efaf425fe.zip
printer related modules cleaning :
- create the printer/ hierarchy - split services related stuff into services.pm & printer::services, - move things that've nothing to do with printers into common.pm (alternatives, permissions, ...) - move eveything related to cups, gimp-print, detection, {star,open}office to the corresponding splited printer:: module - big consolidation of printer::office (it was obvious there were tons of duplication between staroffice and openoffice managment) - move other stuff into printer::main, printer::common, status : print.pm has been heavily splited (now one can begin to understand the little bits). printerdrake still needs to be splited/cleaned and eventually removed since printer/printerdrake modules separation is not understandable by other people till, in printer::gimp, $lprcommand is neither declared nor setted nowhere. idem in mdk9.0 ...
-rw-r--r--perl-install/common.pm59
-rw-r--r--perl-install/printer/common.pm91
-rw-r--r--perl-install/printer/cups.pm30
-rw-r--r--perl-install/printer/data.pm37
-rw-r--r--perl-install/printer/default.pm51
-rw-r--r--perl-install/printer/detect.pm306
-rw-r--r--perl-install/printer/gimp.pm412
-rw-r--r--perl-install/printer/main.pm (renamed from perl-install/printer.pm)1678
-rw-r--r--perl-install/printer/office.pm384
-rw-r--r--perl-install/printer/printerdrake.pm (renamed from perl-install/printerdrake.pm)439
-rw-r--r--perl-install/printer/services.pm61
-rw-r--r--perl-install/services.pm87
-rwxr-xr-xperl-install/standalone/printerdrake28
13 files changed, 1766 insertions, 1897 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 3e46d89aa..4093c1b02 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -4,11 +4,12 @@ use MDK::Common;
use MDK::Common::System;
use diagnostics;
use strict;
+use run_program;
use vars qw(@ISA @EXPORT $SECTORSIZE);
@ISA = qw(Exporter);
# no need to export ``_''
-@EXPORT = qw($SECTORSIZE N N_ translate untranslate formatXiB removeXiBSuffix formatTime setVirtual makedev unmakedev salt);
+@EXPORT = qw($SECTORSIZE N N_ translate untranslate formatXiB removeXiBSuffix formatTime setVirtual makedev unmakedev salt set_permissions files_exist set_alternative);
# perl_checker: RE-EXPORT-ALL
push @EXPORT, @MDK::Common::EXPORT;
@@ -185,4 +186,60 @@ sub join_lines {
@l, if_($s, $s);
}
+
+sub set_alternative {
+ my ($command, $executable) = @_;
+ local *F;
+ # Read the list of executables for the given command to find the number
+ # of the desired executable
+ open F, ($::testing ? $::prefix : "chroot $::prefix/ ") .
+ "/bin/sh -c \"export LC_ALL=C; /bin/echo | update-alternatives --config $command \" |" or
+ die "Could not run \"update-alternatives\"!";
+ my $choice = 0;
+ while (my $line = <F>) {
+ chomp $line;
+ if ($line =~ m/^[\* ][\+ ]\s*([0-9]+)\s+(\S+)\s*$/) { # list entry?
+ if ($2 eq $executable) {
+ $choice = $1;
+ last;
+ }
+ }
+ }
+ close F;
+ # If the executable was found, assign the command to it
+ if ($choice > 0) {
+ system(($::testing ? $::prefix : "chroot $::prefix/ ") .
+ "/bin/sh -c \"/bin/echo $choice | update-alternatives --config $command > /dev/null 2>&1\"");
+ }
+ return 1;
+}
+
+sub files_exist {
+ my @files = @_;
+ foreach my $file (@files) {
+ return 0 unless -f "$::prefix$file"
+ }
+ return 1;
+}
+
+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.
+ return 1 unless $::isInstall;
+ if ($owner && $group) {
+ run_program::rooted($::prefix, "/bin/chown", "$owner.$group", $file)
+ or die "Could not start chown!";
+ } elsif ($owner) {
+ run_program::rooted($::prefix, "/bin/chown", $owner, $file)
+ or die "Could not start chown!";
+ } elsif ($group) {
+ run_program::rooted($::prefix, "/bin/chgrp", $group, $file)
+ or die "Could not start chgrp!";
+ }
+ run_program::rooted($::prefix, "/bin/chmod", $perms, $file)
+ or die "Could not start chmod!";
+}
+
1;
diff --git a/perl-install/printer/common.pm b/perl-install/printer/common.pm
new file mode 100644
index 000000000..13e5919f9
--- /dev/null
+++ b/perl-install/printer/common.pm
@@ -0,0 +1,91 @@
+package printer::common;
+
+use strict;
+
+
+sub addentry {
+ my ($section, $entry, $filecontent) = @_;
+ my $sectionfound = 0;
+ my $entryinserted = 0;
+ my @lines = split("\n", $filecontent);
+ foreach (@lines) {
+ if (!$sectionfound) {
+ if (/^\s*\[\s*$section\s*\]\s*$/) {
+ $sectionfound = 1;
+ }
+ } else {
+ if (!/^\s*$/ && !/^\s*;/) { #-#
+ $_ = "$entry\n$_";
+ $entryinserted = 1;
+ last;
+ }
+ }
+ }
+ if ($sectionfound && !$entryinserted) {
+ push(@lines, $entry);
+ }
+ return join ("\n", @lines);
+}
+
+sub addsection {
+ my ($section, $filecontent) = @_;
+ my $entryinserted = 0;
+ my @lines = split("\n", $filecontent);
+ foreach (@lines) {
+ if (/^\s*\[\s*$section\s*\]\s*$/) {
+ # section already there, nothing to be done
+ return $filecontent;
+ }
+ }
+ return $filecontent . "\n[$section]";
+}
+
+sub removeentry {
+ my ($section, $entry, $filecontent) = @_;
+ my $sectionfound = 0;
+ my $done = 0;
+ my @lines = split("\n", $filecontent);
+ foreach (@lines) {
+ $_ = "$_\n";
+ next if $done;
+ if (!$sectionfound) {
+ if (/^\s*\[\s*$section\s*\]\s*$/) {
+ $sectionfound = 1;
+ }
+ } else {
+ if (/^\s*\[.*\]\s*$/) { # Next section
+ $done = 1;
+ } elsif (/^\s*$entry/) {
+ $_ = "";
+ $done = 1;
+ }
+ }
+ }
+ return join ("", @lines);
+}
+
+sub removesection {
+ my ($section, $filecontent) = @_;
+ my $sectionfound = 0;
+ my $done = 0;
+ my @lines = split("\n", $filecontent);
+ foreach (@lines) {
+ $_ = "$_\n";
+ next if $done;
+ if (!$sectionfound) {
+ if (/^\s*\[\s*$section\s*\]\s*$/) {
+ $_ = "";
+ $sectionfound = 1;
+ }
+ } else {
+ if (/^\s*\[.*\]\s*$/) { # Next section
+ $done = 1;
+ } else {
+ $_ = "";
+ }
+ }
+ }
+ return join ("", @lines);
+}
+
+1;
diff --git a/perl-install/printer/cups.pm b/perl-install/printer/cups.pm
new file mode 100644
index 000000000..1de54edf2
--- /dev/null
+++ b/perl-install/printer/cups.pm
@@ -0,0 +1,30 @@
+package printer::cups;
+
+use strict;
+use printer::data;
+
+sub get_remote_queues {
+ my ($printer) = $_[0];
+ # The following code reads in a list of all remote printers which the
+ # local CUPS daemon knows due to broadcasting of remote servers or
+ # "BrowsePoll" entries in the local /etc/cups/cupsd.conf
+ local *F;
+ open F, ($::testing ? $::prefix : "chroot $::prefix/ ") .
+ "lpstat -v |" or return ();
+ my @printerlist;
+ my $line;
+ while ($line = <F>) {
+ if ($line =~ m/^\s*device\s+for\s+([^:\s]+):\s*(\S+)\s*$/) {
+ my $queuename = $1;
+ if (($2 =~ m!^ipp://([^/:]+)[:/]!) &&
+ (!$printer->{configured}{$queuename})) {
+ my $server = $1;
+ push (@printerlist, "$queuename|$server");
+ }
+ }
+ }
+ close F;
+ return @printerlist;
+}
+
+1;
diff --git a/perl-install/printer/data.pm b/perl-install/printer/data.pm
new file mode 100644
index 000000000..0c7a29eed
--- /dev/null
+++ b/perl-install/printer/data.pm
@@ -0,0 +1,37 @@
+package printer::data;
+
+use strict;
+use common;
+
+# BUG, FIXME : this was neither declered nor setted anywhere before :
+# maybe this should be swtiched :
+# $lprcommand{stuff} => $spoolers{stuff}{print_command}
+
+our %lprcommand;
+
+our %spoolers = ('ppq' => {
+ 'help' => "/usr/bin/lphelp %s |",
+ 'print_command' => 'lpr-pdq',
+ 'long_name' =>N("PDQ - Print, Don't Queue"),
+ 'short_name' => N("PDQ")
+ },
+ 'lpd' => {
+ 'help' => "/usr/bin/pdq -h -P %s 2>&1 |",
+ 'print_command' => 'lpr',
+ 'long_name' => N("LPD - Line Printer Daemon"),
+ 'short_name' => N("LPD")
+ },
+ 'lprng' => {
+ 'print_command' => 'lpr-lpd',
+ 'long_name' => N("LPRng - LPR New Generation"),
+ 'short_name' => N("LPRng")
+ },
+ 'cups' => {
+ 'print_command' => 'lpr-cups',
+ 'long_name' => N("CUPS - Common Unix Printing System"),
+ 'short_name' => N("CUPS")
+ }
+ );
+our %spooler_inv = map { $spoolers{$_}{long_name} => $_ } keys %spoolers;
+
+our %shortspooler_inv = map { $spoolers{$_}{short_name} => $_ } keys %spoolers;
diff --git a/perl-install/printer/default.pm b/perl-install/printer/default.pm
new file mode 100644
index 000000000..5c15645d2
--- /dev/null
+++ b/perl-install/printer/default.pm
@@ -0,0 +1,51 @@
+package printer::default;
+
+use strict;
+use run_program;
+use common;
+
+#-configuration directory of Foomatic
+my $FOOMATICCONFDIR = "/etc/foomatic";
+#-location of the file containing the default spooler's name
+my $FOOMATIC_DEFAULT_SPOOLER = "$FOOMATICCONFDIR/defaultspooler";
+
+sub set_printer {
+ my ($printer) = $_[0];
+ run_program::rooted($::prefix, "foomatic-configure",
+ "-D", "-q", "-s", $printer->{SPOOLER},
+ "-n", $printer->{DEFAULT}) or return 0;
+ return 1;
+}
+
+sub get_printer {
+ my $printer = $_[0];
+ local *F;
+ open F, ($::testing ? $::prefix : "chroot $::prefix/ ") .
+ "foomatic-configure -Q -q -s $printer->{SPOOLER} |" or return undef;
+ my $line;
+ while ($line = <F>) {
+ if ($line =~ m!^\s*<defaultqueue>(.*)</defaultqueue>\s*$!) {
+ return $1;
+ }
+ }
+ return undef;
+}
+
+sub printer_type($) { "LOCAL" }
+
+sub get_spooler () {
+ if (-f "$::prefix$FOOMATIC_DEFAULT_SPOOLER") {
+ my $spool = cat_("$::prefix$FOOMATIC_DEFAULT_SPOOLER");
+ chomp $spool;
+ return $spool if $spool =~ /cups|lpd|lprng|pdq/;
+ }
+}
+
+sub set_spooler ($) {
+ my ($printer) = @_;
+ # Mark the default driver in a file
+ output_p("$::prefix$FOOMATIC_DEFAULT_SPOOLER", $printer->{SPOOLER});
+}
+
+
+1;
diff --git a/perl-install/printer/detect.pm b/perl-install/printer/detect.pm
new file mode 100644
index 000000000..8439f9a37
--- /dev/null
+++ b/perl-install/printer/detect.pm
@@ -0,0 +1,306 @@
+package printer::detect;
+
+use strict;
+use common;
+use detect_devices;
+use modules;
+
+sub local_detect {
+ modules::get_probeall("usb-interface") and eval { modules::load("printer") };
+ eval { modules::unload(qw(lp parport_pc parport_probe parport)) }; #- on kernel 2.4 parport has to be unloaded to probe again
+ eval { modules::load(qw(parport_pc lp parport_probe)) }; #- take care as not available on 2.4 kernel (silent error).
+ my $b = before_leaving { eval { modules::unload("parport_probe") } };
+ detect_devices::whatPrinter();
+}
+
+sub net_detect { whatNetPrinter(1, 0) }
+
+sub net_smb_detect { whatNetPrinter(0, 1) }
+
+sub detect {
+ local_detect(), net_detect(), net_smb_detect();
+}
+
+sub whatNetPrinter {
+ my ($network, $smb) = @_;
+
+ my ($i,@res);
+
+ # Which ports should be scanned?
+ my @portstoscan;
+ push @portstoscan, "139" if $smb;
+ push @portstoscan, "4010", "4020", "4030", "5503", "9100-9104" if $network;
+
+ return () if $#portstoscan < 0;
+ my $portlist = join (",", @portstoscan);
+
+ # Which hosts should be scanned?
+ # (Applying nmap to a whole network is very time-consuming, because nmap
+ # waits for a certain timeout period on non-existing hosts, so we get a
+ # lists of existing hosts by pinging the broadcast addresses for existing
+ # hosts and then scanning only them, which is much faster)
+ my @hostips = getIPsInLocalNetworks();
+ return () if $#hostips < 0;
+ my $hostlist = join (" ", @hostips);
+
+ # Scan network for printers, the timeout settings are there to avoid
+ # delays caused by machines blocking their ports with a firewall
+ local *F;
+ open F, ($::testing ? "" : "chroot $::prefix/ ") .
+ "/bin/sh -c \"export LC_ALL=C; nmap -r -P0 --host_timeout 400 --initial_rtt_timeout 200 -p $portlist $hostlist\" |"
+ or return @res;
+ my ($host, $ip, $port, $modelinfo) = ("", "", "", "");
+ while (my $line = <F>) {
+ chomp $line;
+
+ # head line of the report of a host with the ports in question open
+ #if ($line =~ m/^\s*Interesting\s+ports\s+on\s+(\S*)\s*\(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\)\s*:\s*$/i) {
+ if ($line =~ m/^\s*Interesting\s+ports\s+on\s+(\S*)\s*\((\S+)\)\s*:\s*$/i) {
+ ($host, $ip) = ($1, $2);
+ $host = $ip if $host eq "";
+ $port = "";
+
+ undef $modelinfo;
+
+ } elsif ($line =~ m/^\s*(\d+)\/\S+\s+open\s+/i) {
+ next if $ip eq "";
+ $port = $1;
+
+ # Now we have all info for one printer
+ # Store this auto-detection result in the data structure
+
+ # Determine the protocol by the port number
+
+ # SMB/Windows
+ if ($port eq "139") {
+ my @shares = getSMBPrinterShares($ip);
+ foreach my $share (@shares) {
+ push @res, { port => "smb://$host/$share->{name}",
+ val => { CLASS => 'PRINTER',
+ MODEL => N("Unknown Model"),
+ MANUFACTURER => "",
+ DESCRIPTION => "$share->{description}",
+ SERIALNUMBER => ""
+ }
+ };
+ }
+ } else {
+ if (!defined($modelinfo)) {
+ # SNMP request to auto-detect model
+ $modelinfo = getSNMPModel ($ip);
+ }
+ if (defined($modelinfo)) {
+ push @res, { port => "socket://$host:$port",
+ val => $modelinfo
+ };
+ }
+ }
+ }
+ }
+ close F;
+ @res;
+}
+
+sub getIPsInLocalNetworks {
+
+ # subroutine determines the list of all hosts reachable in the local
+ # networks by means of pinging the broadcast addresses.
+
+ # Return an empty list if no network is running
+ return () unless network_running();
+
+ # Read the output of "ifconfig" to determine the broadcast addresses of
+ # the local networks
+ my $dev_is_localnet = 0;
+ my @local_bcasts;
+ my $current_bcast = "";
+
+ local *IFCONFIG_OUT;
+ open IFCONFIG_OUT, ($::testing ? "" : "chroot $::prefix/ ") .
+ "/bin/sh -c \"export LC_ALL=C; ifconfig\" |" or return ();
+ while (my $readline = <IFCONFIG_OUT>) {
+ # New entry ...
+ if ($readline =~ /^(\S+)\s/) {
+ my $dev = $1;
+ # ... for a local network (eth = ethernet,
+ # vmnet = VMWare,
+ # ethernet card connected to ISP excluded)?
+ $dev_is_localnet = (($dev =~ /^eth/) || ($dev =~ /^vmnet/));
+ # delete previous address
+ $current_bcast = "";
+ }
+ # Are we in the important line now?
+ if ($readline =~ /\sBcast:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\s/) {
+ # Rip out the broadcast IP address
+ $current_bcast = $1;
+
+ # Are we in an entry for a local network?
+ if ($dev_is_localnet == 1) {
+ # Store current IP address
+ push @local_bcasts, $current_bcast;
+ }
+ }
+ }
+ close(IFCONFIG_OUT);
+
+ my @addresses;
+ # Now ping all broadcast addresses and additionally "nmblookup" the
+ # networks (to find Windows servers which do not answer to ping)
+ foreach my $bcast (@local_bcasts) {
+ local *F;
+ open F, ($::testing ? "" : "chroot $::prefix/ ") .
+ "/bin/sh -c \"export LC_ALL=C; ping -w 1 -b -n $bcast | cut -f 4 -d ' ' | sed s/:// | egrep '^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+' | uniq | sort\" |"
+ or next;
+ local $_;
+ while (<F>) { chomp; push @addresses, $_ }
+ close F;
+ if (-x "/usr/bin/nmblookup") {
+ local *F;
+ open F, ($::testing ? "" : "chroot $::prefix/ ") .
+ "/bin/sh -c \"export LC_ALL=C; nmblookup -B $bcast \\* | cut -f 1 -d ' ' | egrep '^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+' | uniq | sort\" |"
+ or next;
+ local $_;
+ while (<F>) {
+ chomp;
+ push @addresses, $_ if !(member($_,@addresses));
+ }
+ }
+ }
+
+ @addresses;
+}
+
+sub getSMBPrinterShares {
+ my ($host) = @_;
+
+ # SMB request to auto-detect shares
+ local *F;
+ open F, ($::testing ? "" : "chroot $::prefix/ ") .
+ "/bin/sh -c \"export LC_ALL=C; smbclient -N -L $host\" |" or return ();
+ my $insharelist = 0;
+ my @shares;
+ while (my $l = <F>) {
+ chomp $l;
+ if ($l =~ /^\s*Sharename\s+Type\s+Comment\s*$/i) {
+ $insharelist = 1;
+ } elsif ($l =~ /^\s*Server\s+Comment\s*$/i) {
+ $insharelist = 0;
+ } elsif (($l =~ /^\s*(\S+)\s+Printer\s*(.*)$/i) &&
+ ($insharelist)) {
+ my $name = $1;
+ my $description = $2;
+ $description =~ s/^(\s*)//;
+ push (@shares, { name => $name, description => $description });
+ }
+ }
+ close F;
+
+ return @shares;
+}
+
+sub getSNMPModel {
+ my ($host) = @_;
+ my $manufacturer = "";
+ my $model = "";
+ my $description = "";
+ my $serialnumber = "";
+
+ # SNMP request to auto-detect model
+ local *F;
+ open F, ($::testing ? $::prefix : "chroot $::prefix/ ") .
+ "/bin/sh -c \"scli -1 -c 'show printer info' $host\" |" or
+ return { CLASS => 'PRINTER',
+ MODEL => N("Unknown Model"),
+ MANUFACTURER => "",
+ DESCRIPTION => "",
+ SERIALNUMBER => ""
+ };
+ while (my $l = <F>) {
+ chomp $l;
+ if (($l =~ /^\s*Manufacturer:\s*(\S.*)$/i) &&
+ ($l =~ /^\s*Vendor:\s*(\S.*)$/i)) {
+ $manufacturer = $1;
+ $manufacturer =~ s/Hewlett[-\s_]Packard/HP/;
+ $manufacturer =~ s/HEWLETT[-\s_]PACKARD/HP/;
+ } elsif ($l =~ /^\s*Model:\s*(\S.*)$/i) {
+ $model = $1;
+ } elsif ($l =~ /^\s*Description:\s*(\S.*)$/i) {
+ $description = $1;
+ $description =~ s/Hewlett[-\s_]Packard/HP/;
+ $description =~ s/HEWLETT[-\s_]PACKARD/HP/;
+ } elsif ($l =~ /^\s*Serial\s*Number:\s*(\S.*)$/i) {
+ $serialnumber = $1;
+ }
+ }
+ close F;
+
+ # Was there a manufacturer and a model in the output?
+ # If not, get them from the description
+ if (($manufacturer eq "") || ($model eq "")) {
+ if ($description =~ /^\s*(\S*)\s+(\S.*)$/) {
+ $manufacturer = $1 if $manufacturer eq "";
+ $model = $2 if $model eq "";
+ }
+ # No description field? Make one out of manufacturer and model.
+ } elsif ($description eq "") {
+ $description = "$manufacturer $model";
+ }
+
+ # We couldn't determine a model
+ $model = N("Unknown Model") if $model eq "";
+
+ # Remove trailing spaces
+ $manufacturer =~ s/(\S+)\s+$/$1/;
+ $model =~ s/(\S+)\s+$/$1/;
+ $description =~ s/(\S+)\s+$/$1/;
+ $serialnumber =~ s/(\S+)\s+$/$1/;
+
+ # Now we have all info for one printer
+ # Store this auto-detection result in the data structure
+ return { CLASS => 'PRINTER',
+ MODEL => $model,
+ MANUFACTURER => $manufacturer,
+ DESCRIPTION => $description,
+ SERIALNUMBER => $serialnumber
+ };
+}
+
+sub network_running {
+ # If the network is not running return 0, otherwise 1.
+ local *F;
+ open F, ($::testing ? $::prefix : "chroot $::prefix/ ") .
+ "/bin/sh -c \"export LC_ALL=C; /sbin/ifconfig\" |" or
+ die "Could not run \"ifconfig\"!";
+ while (my $line = <F>) {
+ if (($line !~ /^lo\s+/) && # The loopback device can have been
+ # started by the spooler's startup script
+ ($line =~ /^(\S+)\s+/)) { # In this line starts an entry for a
+ # running network
+ close F;
+ return 1;
+ }
+ }
+ close F;
+ return 0;
+}
+
+sub parport_addr {
+ # auto-detect the parallel port addresses
+ my ($device) = @_;
+ $device =~ m!^/dev/lp(\d+)$! or
+ $device =~ m!^/dev/printers/(\d+)$!;
+ my $portnumber = $1;
+ my $parport_addresses =
+ `cat /proc/sys/dev/parport/parport$portnumber/base-addr`;
+ my $address_arg;
+ if ($parport_addresses =~ /^\s*(\d+)\s+(\d+)\s*$/) {
+ $address_arg = sprintf(" -base 0x%x -basehigh 0x%x", $1, $2);
+ } elsif ($parport_addresses =~ /^\s*(\d+)\s*$/) {
+ $address_arg = sprintf(" -base 0x%x", $1);
+ } else {
+ $address_arg = "";
+ }
+ return $address_arg;
+}
+
+1;
diff --git a/perl-install/printer/gimp.pm b/perl-install/printer/gimp.pm
new file mode 100644
index 000000000..6d92d5fe3
--- /dev/null
+++ b/perl-install/printer/gimp.pm
@@ -0,0 +1,412 @@
+package printer::gimp;
+
+use strict;
+use run_program;
+use common;
+use printer::common;
+use printer::data;
+use printer::cups;
+
+# ------------------------------------------------------------------
+# GIMP-print related stuff
+# ------------------------------------------------------------------
+
+sub configure {
+ my ($printer, $queue) = @_;
+ # Do we have files to treat?
+ my @configfilenames = findconfigfiles();
+ return 1 if $#configfilenames < 0;
+ # There is no system-wide config file, treat every user's config file
+ foreach my $configfilename (@configfilenames) {
+ # Load GIMP's printer config file
+ my $configfilecontent = readconfigfile($configfilename);
+ # Update local printer queues
+ foreach my $queue (keys(%{$printer->{configured}})) {
+ # Check if we have a PPD file
+ if (! -r "$::prefix/etc/foomatic/$queue.ppd") {
+ if (-r "$::prefix/etc/cups/ppd/$queue.ppd") {
+ # If we have a PPD file in the CUPS config dir, link to it
+ run_program::rooted($::prefix,
+ "ln", "-sf",
+ "/etc/cups/ppd/$queue.ppd",
+ "/etc/foomatic/$queue.ppd");
+ } elsif (-r "$::prefix/usr/share/postscript/ppd/$queue.ppd") {
+ # Check PPD directory of GPR, too
+ run_program::rooted
+ ($::prefix,
+ "ln", "-sf",
+ "/usr/share/postscript/ppd/$queue.ppd",
+ "/etc/foomatic/$queue.ppd");
+ } else {
+ # No PPD file at all? We cannot set up this printer
+ next;
+ }
+ }
+ # Add the printer entry
+ if (!isprinterconfigured ($queue, $configfilecontent)) {
+ # Remove the old printer entry
+ $configfilecontent =
+ removeprinter($queue, $configfilecontent);
+ # Add the new printer entry
+ $configfilecontent =
+ makeprinterentry($printer, $queue,
+ $configfilecontent);
+ }
+ }
+ # Default printer
+ if ($printer->{DEFAULT}) {
+ if ($configfilecontent !~ /^\s*Current\-Printer\s*:/m) {
+ $configfilecontent =~
+ s/\n/\nCurrent-Printer: $printer->{DEFAULT}\n/s;
+ } else {
+ $configfilecontent =~ /^\s*Current\-Printer\s*:\s*(\S+)\s*$/m;
+ if (!isprinterconfigured ($1, $configfilecontent)) {
+ $configfilecontent =~
+ s/(Current\-Printer\s*:\s*)\S+/$1$printer->{DEFAULT}/;
+ }
+ }
+ }
+ # Write back GIMP's printer configuration file
+ writeconfigfile($configfilename, $configfilecontent);
+ }
+ return 1;
+}
+
+sub addcupsremoteto {
+ my ($printer, $queue) = @_;
+ # Do we have files to treat?
+ my @configfilenames = findconfigfiles();
+ return 1 if $#configfilenames < 0;
+ my @printerlist = printer::cups::get_remote_queues();
+ my $ppdfile = "";
+ if (($printer->{SPOOLER} eq "cups") &&
+ ((-x "$::prefix/usr/bin/curl") || (-x "$::prefix/usr/bin/wget"))) {
+ foreach my $listentry (@printerlist) {
+ next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
+ my $q = $1;
+ next if $q ne $queue;
+ my $server = $2;
+ # Remove server name from queue name
+ $q =~ s/^([^@]*)@.*$/$1/;
+ if (-x "$::prefix/usr/bin/wget") {
+ eval(run_program::rooted
+ ($::prefix, "/usr/bin/wget", "-O",
+ "/etc/foomatic/$queue.ppd",
+ "http://$server:631/printers/$q.ppd"));
+ } else {
+ eval(run_program::rooted
+ ($::prefix, "/usr/bin/curl", "-o",
+ "/etc/foomatic/$queue.ppd",
+ "http://$server:631/printers/$q.ppd"));
+ }
+ # Does the file exist and is it not an error message?
+ if ((-r "$::prefix/etc/foomatic/$queue.ppd") &&
+ (cat_("$::prefix/etc/foomatic/$queue.ppd") =~
+ /^\*PPD-Adobe/)) {
+ $ppdfile = "/etc/foomatic/$queue.ppd";
+ } else {
+ unlink ("$::prefix/etc/foomatic/$queue.ppd");
+ return 0;
+ }
+ }
+ } else {
+ return 1;
+ }
+ # There is no system-wide config file, treat every user's config file
+ foreach my $configfilename (@configfilenames) {
+ # Load GIMP's printer config file
+ my $configfilecontent = readconfigfile($configfilename);
+ # Add the printer entry
+ if (!isprinterconfigured ($queue, $configfilecontent)) {
+ # Remove the old printer entry
+ $configfilecontent =
+ removeprinter($queue, $configfilecontent);
+ # Add the new printer entry
+ $configfilecontent =
+ makeprinterentry($printer, $queue,
+ $configfilecontent);
+ }
+ # Write back GIMP's printer configuration file
+ writeconfigfile($configfilename, $configfilecontent);
+ }
+ return 1;
+}
+
+sub removeprinterfrom {
+ my ($printer, $queue) = @_;
+ # Do we have files to treat?
+ my @configfilenames = findconfigfiles();
+ return 1 if $#configfilenames < 0;
+ # There is no system-wide config file, treat every user's config file
+ foreach my $configfilename (@configfilenames) {
+ # Load GIMP's printer config file
+ my $configfilecontent = readconfigfile($configfilename);
+ # Remove the printer entry
+ $configfilecontent =
+ removeprinter($queue, $configfilecontent);
+ # Write back GIMP's printer configuration file
+ writeconfigfile($configfilename, $configfilecontent);
+ }
+ return 1;
+}
+
+sub removelocalprintersfrom {
+ my ($printer) = @_;
+ # Do we have files to treat?
+ my @configfilenames = findconfigfiles();
+ return 1 if $#configfilenames < 0;
+ # There is no system-wide config file, treat every user's config file
+ foreach my $configfilename (@configfilenames) {
+ # Load GIMP's printer config file
+ my $configfilecontent = readconfigfile($configfilename);
+ # Remove the printer entries
+ foreach my $queue (keys(%{$printer->{configured}})) {
+ $configfilecontent =
+ removeprinter($queue, $configfilecontent);
+ }
+ # Write back GIMP's printer configuration file
+ writeconfigfile($configfilename, $configfilecontent);
+ }
+ return 1;
+}
+
+sub makeprinterentry {
+ my ($printer, $queue, $configfile) = @_;
+ # Make printer's section
+ $configfile = addprinter($queue, $configfile);
+ # Load PPD file
+ my $ppd = cat_("$::prefix/etc/foomatic/$queue.ppd");
+ # Is the printer configured with GIMP-Print?
+ my $gimpprintqueue = 0;
+ my $gimpprintdriver = "ps2";
+ if ($ppd =~ /CUPS\s*\+\s*GIMP\s*\-\s*Print/im) {
+ # Native CUPS driver
+ $gimpprintqueue = 1;
+ $ppd =~ /\s*\*ModelName:\s*\"(\S+)\"\s*$/im;
+ $gimpprintdriver = $1;
+ } elsif ($ppd =~ /Foomatic\s*\+\s*gimp\s*\-\s*print/im) {
+ # GhostScript + Foomatic driver
+ $gimpprintqueue = 1;
+ $ppd =~
+ /'idx'\s*=>\s*'ev\/gimp-print-((escp2|pcl|bjc|lexmark)\-\S*)'/im;
+ $gimpprintdriver = $1;
+ }
+ if ($gimpprintqueue) {
+ # Get the paper size from the PPD file
+ if ($ppd =~ /^\s*\*DefaultPageSize:\s*(\S+)\s*$/m) {
+ my $papersize = $1;
+ $configfile = removeentry($queue,
+ "Media-Size", $configfile);
+ $configfile = addentry($queue,
+ "Media-Size: $papersize", $configfile);
+ }
+ $configfile = removeentry($queue,
+ "PPD-File:", $configfile);
+ $configfile = addentry($queue,
+ "PPD-File:", $configfile);
+ $configfile = removeentry($queue,
+ "Driver:", $configfile);
+ $configfile = addentry($queue,
+ "Driver: $gimpprintdriver", $configfile);
+ $configfile = removeentry($queue,
+ "Destination:", $configfile);
+ $configfile = addentry($queue,
+ "Destination: /usr/bin/$printer::data::lprcommand{$printer->{SPOOLER}{print_command}} -P $queue -o raw", $configfile);
+ } else {
+ $configfile = removeentry($queue,
+ "PPD-File:", $configfile);
+ $configfile = addentry($queue,
+ "PPD-File: /etc/foomatic/$queue.ppd", $configfile);
+ $configfile = removeentry($queue,
+ "Driver:", $configfile);
+ $configfile = addentry($queue,
+ "Driver: ps2", $configfile);
+ $configfile = removeentry($queue,
+ "Destination:", $configfile);
+ $configfile = addentry($queue,
+ "Destination: /usr/bin/$printer::data::lprcommand{$printer->{SPOOLER}{print_command}} -P $queue", $configfile);
+ }
+ return $configfile;
+}
+
+sub findconfigfiles {
+ my @configfilenames;
+ push (@configfilenames, ".gimp-1.2/printrc") if -d "$::prefix/usr/lib/gimp/1.2";
+ push (@configfilenames, ".gimp-1.3/printrc") if -d "$::prefix/usr/lib/gimp/1.3";
+ my @filestotreat;
+ local *PASSWD;
+ open PASSWD, "< $::prefix/etc/passwd" or die "Cannot read /etc/passwd!\n";
+ local $_;
+ while (<PASSWD>) {
+ chomp;
+ if (/^([^:]+):[^:]*:([^:]+):([^:]+):[^:]*:([^:]+):[^:]*$/) {
+ my ($username, $uid, $gid, $homedir) = ($1, $2, $3, $4);
+ if ((($uid == 0) || ($uid >= 500)) && ($username ne "nobody")) {
+ foreach my $file (@configfilenames) {
+ my $dir = "$homedir/$file";
+ $dir =~ s,/[^/]*$,,;
+ next if (-f $dir) && (! -d $dir);
+ if (! -d "$::prefix$dir") {
+ run_program::rooted($::prefix,
+ "/bin/mkdir", $dir)
+ or next;
+ run_program::rooted($::prefix,
+ "/bin/chown", "$uid.$gid", $dir)
+ or next;
+ }
+ if (! -f "$::prefix$homedir/$file") {
+ local *F;
+ open F, "> $::prefix$homedir/$file" or next;
+ print F "#PRINTRCv1 written by GIMP-PRINT 4.2.2 - 13 Sep 2002\n";
+ close F;
+ run_program::rooted($::prefix,
+ "/bin/chown", "$uid.$gid",
+ "$homedir/$file")
+ or next;
+ }
+ push (@filestotreat, "$homedir/$file");
+ }
+ }
+ }
+ }
+ @filestotreat;
+}
+
+sub readconfigfile {
+ my ($file) = @_;
+ local *F;
+ open F, "< $::prefix$file" or return "";
+ my $filecontent = join("", <F>);
+ close F;
+ return $filecontent;
+}
+
+sub writeconfigfile {
+ my ($file, $filecontent) = @_;
+ local *F;
+ open F, "> $::prefix$file" or return 0;
+ print F $filecontent;
+ close F;
+ return 1;
+}
+
+sub addentry {
+ my ($section, $entry, $filecontent) = @_;
+ my $sectionfound = 0;
+ my $entryinserted = 0;
+ my @lines = split("\n", $filecontent);
+ foreach (@lines) {
+ if (!$sectionfound) {
+ if (/^\s*Printer\s*:\s*($section)\s*$/) {
+ $sectionfound = 1;
+ }
+ } else {
+ if (!/^\s*$/ && !/^\s*;/) { #-#
+ $_ = "$entry\n$_";
+ $entryinserted = 1;
+ last;
+ }
+ }
+ }
+ if ($sectionfound && !$entryinserted) {
+ push(@lines, $entry);
+ }
+ return join ("\n", @lines);
+}
+
+sub addprinter {
+ my ($section, $filecontent) = @_;
+ my $entryinserted = 0;
+ my @lines = split("\n", $filecontent);
+ foreach (@lines) {
+ if (/^\s*Printer\s*:\s*($section)\s*$/) {
+ # section already there, nothing to be done
+ return $filecontent;
+ }
+ }
+ return $filecontent . "\nPrinter: $section";
+}
+
+sub removeentry {
+ my ($section, $entry, $filecontent) = @_;
+ my $sectionfound = 0;
+ my $done = 0;
+ my @lines = split("\n", $filecontent);
+ foreach (@lines) {
+ $_ = "$_\n";
+ next if $done;
+ if (!$sectionfound) {
+ if (/^\s*Printer\s*:\s*($section)\s*$/) {
+ $sectionfound = 1;
+ }
+ } else {
+ if (/^\s*Printer\s*:\s*.*\s*$/) { # Next section
+ $done = 1;
+ } elsif (/^\s*$entry/) {
+ $_ = "";
+ $done = 1;
+ }
+ }
+ }
+ return join ("", @lines);
+}
+
+sub removeprinter {
+ my ($section, $filecontent) = @_;
+ my $sectionfound = 0;
+ my $done = 0;
+ my @lines = split("\n", $filecontent);
+ foreach (@lines) {
+ $_ = "$_\n";
+ next if $done;
+ if (!$sectionfound) {
+ if (/^\s*Printer\s*:\s*($section)\s*$/) {
+ $_ = "";
+ $sectionfound = 1;
+ }
+ } else {
+ if (/^\s*Printer\s*:\s*.*\s*$/) { # Next section
+ $done = 1;
+ } else {
+ $_ = "";
+ }
+ }
+ }
+ return join ("", @lines);
+}
+
+sub isprinterconfigured {
+ my ($queue, $filecontent) = @_;
+ my $sectionfound = 0;
+ my $done = 0;
+ my $drivernotps2 = 0;
+ my $ppdfileset = 0;
+ my $nonrawprinting = 0;
+ my @lines = split("\n", $filecontent);
+ foreach (@lines) {
+ last if $done;
+ if (!$sectionfound) {
+ if (/^\s*Printer\s*:\s*($queue)\s*$/) {
+ $sectionfound = 1;
+ }
+ } else {
+ if (/^\s*Printer\s*:\s*.*\s*$/) { # Next section
+ $done = 1;
+ } elsif (/^\s*Driver:\s*(\S+)\s*$/) {
+ $drivernotps2 = ($1 ne "ps2");
+ } elsif (/^\s*PPD\-File:\s*(\S+)\s*$/) {
+ $ppdfileset = 1;
+ } elsif (/^\s*Destination:\s*(\S+.*)$/) {
+ $nonrawprinting = ($1 !~ /\-o\s*raw/);
+ }
+ }
+ }
+ return 0 if $done && !$sectionfound;
+ return 1 if $ppdfileset || $drivernotps2 || $nonrawprinting;
+ return 0;
+}
+
+
+# ------------------------------------------------------------------
+
+1;
diff --git a/perl-install/printer.pm b/perl-install/printer/main.pm
index 11f451442..ad525b0d6 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer/main.pm
@@ -1,54 +1,29 @@
-package printer;
+package printer::main;
# $Id$
-#use diagnostics;
-#use strict;
+#
+#
use common;
use run_program;
+use printer::services;
+use printer::default;
+use printer::gimp;
+use printer::cups;
+use printer::office;
+use printer::detect;
+use printer::data;
+use services;
-#-if we are in an DrakX config
-my $prefix = "";
#-location of the printer database in an installed system
my $PRINTER_DB_FILE = "/usr/share/foomatic/db/compiled/overview.xml";
-#-configuration directory of Foomatic
-my $FOOMATICCONFDIR = "/etc/foomatic";
-#-location of the file containing the default spooler's name
-my $FOOMATIC_DEFAULT_SPOOLER = "$FOOMATICCONFDIR/defaultspooler";
#-Did we already read the subroutines of /usr/sbin/ptal-init?
my $ptalinitread = 0;
-our %spoolers = ('ppq' => {
- 'help' => "/usr/bin/lphelp %s |",
- 'print_command' => 'lpr-pdq',
- 'long_name' =>N("PDQ - Print, Don't Queue"),
- 'short_name' => N("PDQ")
- },
- 'lpd' => {
- 'help' => "/usr/bin/pdq -h -P %s 2>&1 |",
- 'print_command' => 'lpr-cups',
- 'long_name' => N("LPD - Line Printer Daemon"),
- 'short_name' => N("LPD")
- },
- 'lprng' => {
- 'print_command' => 'lpr-lpd',
- 'long_name' => N("LPRng - LPR New Generation"),
- 'short_name' => N("LPRng")
- },
- 'cups' => {
- 'print_command' => 'lpr-cups',
- 'long_name' => N("CUPS - Common Unix Printing System"),
- 'short_name' => N("CUPS")
- }
- );
-our %spooler_inv = map { $spooler{$_}{long_name} => $_ } keys %spoolers;
-
-our %shortspooler_inv = map { $spooler{$_}{short_name} => $_ } keys %spoolers;
-
%printer_type = (
N("Local printer") => "LOCAL",
N("Remote printer") => "REMOTE",
@@ -66,8 +41,6 @@ our %printer_type_inv = reverse %printer_type;
sub set_prefix($) { $prefix = $_[0] }
-sub default_printer_type($) { "LOCAL" }
-
sub spooler {
# LPD is taken from the menu for the moment because the classic LPD is
# highly unsecure. Depending on how the GNU lpr development is going on
@@ -78,8 +51,7 @@ sub spooler {
# LPRng is not officially supported any more since Mandrake 9.0, so
# show it only in the spooler menu when it was manually installed.
my @res;
- if (files_exist((qw(/usr/lib/filters/lpf
- /usr/sbin/lpd)))) {
+ if (files_exist((qw(/usr/lib/filters/lpf /usr/sbin/lpd)))) {
foreach (qw(cups lprng pdq)) { push @res, $spooler_inv{$_}{long_name} };
# {qw(cups lprng pdq)}{long_name};
} else {
@@ -104,133 +76,6 @@ sub printer_type($) {
}
}
-sub get_default_spooler () {
- if (-f "$prefix$FOOMATIC_DEFAULT_SPOOLER") {
- my $spool = cat_("$prefix$FOOMATIC_DEFAULT_SPOOLER");
- chomp $spool;
- return $spool if $spool =~ /cups|lpd|lprng|pdq/;
- }
-}
-
-sub set_default_spooler ($) {
- my ($printer) = @_;
- # Mark the default driver in a file
- output_p("$prefix$FOOMATIC_DEFAULT_SPOOLER", $printer->{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)
- or die "Could not start chown!";
- } elsif ($owner) {
- run_program::rooted($prefix, "/bin/chown", $owner, $file)
- or die "Could not start chown!";
- } elsif ($group) {
- run_program::rooted($prefix, "/bin/chgrp", $group, $file)
- or die "Could not start chgrp!";
- }
- run_program::rooted($prefix, "/bin/chmod", $perms, $file)
- or die "Could not start chmod!";
-}
-
-sub restart_service ($) {
- my ($service) = @_;
- # Exit silently if the service is not installed
- return 1 if !(-x "$prefix/etc/rc.d/init.d/$service");
- run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "restart");
- if (($? >> 8) != 0) {
- return 0;
- } else {
- # CUPS needs some time to come up.
- wait_for_cups() if $service eq "cups";
- return 1;
- }
-}
-
-sub start_service ($) {
- my ($service) = @_;
- # Exit silently if the service is not installed
- return 1 if !(-x "$prefix/etc/rc.d/init.d/$service");
- run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "start");
- if (($? >> 8) != 0) {
- return 0;
- } else {
- # CUPS needs some time to come up.
- wait_for_cups() if $service eq "cups";
- return 1;
- }
-}
-
-sub start_not_running_service ($) {
- my ($service) = @_;
- # Exit silently if the service is not installed
- return 1 if !(-x "$prefix/etc/rc.d/init.d/$service");
- run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "status");
- # The exit status is not zero when the service is not running
- if (($? >> 8) != 0) {
- run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "start");
- if (($? >> 8) != 0) {
- return 0;
- } else {
- # CUPS needs some time to come up.
- wait_for_cups() if $service eq "cups";
- return 1;
- }
- } else {
- return 1;
- }
-}
-
-sub stop_service ($) {
- my ($service) = @_;
- # Exit silently if the service is not installed
- return 1 if !(-x "$prefix/etc/rc.d/init.d/$service");
- run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "stop");
- if (($? >> 8) != 0) { return 0 } else { return 1 }
-}
-
-sub service_running ($) {
- my ($service) = @_;
- # Exit silently if the service is not installed
- return 0 if !(-x "$prefix/etc/rc.d/init.d/$service");
- run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "status");
- # The exit status is not zero when the service is not running
- if (($? >> 8) != 0) {
- return 0;
- } else {
- return 1;
- }
-}
-
-sub service_starts_on_boot ($) {
- my ($service) = @_;
- local *F;
- open F, ($::testing ? $prefix : "chroot $prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; /sbin/chkconfig --list $service 2>&1\" |" or
- return 0;
- while (my $line = <F>) {
- chomp $line;
- if ($line =~ /:on/) {
- close F;
- return 1;
- }
- }
- close F;
- return 0;
-}
-
-sub start_service_on_boot ($) {
- my ($service) = @_;
- run_program::rooted($prefix, "/sbin/chkconfig", "--add", $service)
- or return 0;
- return 1;
-}
-
sub SIGHUP_daemon {
my ($service) = @_;
if ($service eq "cupsd") { $service = "cups" };
@@ -250,39 +95,21 @@ sub SIGHUP_daemon {
$daemon = $service if ! defined $daemon;
# if ($service eq "cups") {
# # The current CUPS (1.1.13) dies on SIGHUP, do the normal restart.
-# restart_service($service);
+# printer::services::restart($service);
# # CUPS needs some time to come up.
-# wait_for_cups();
+# printer::services::wait_for_cups();
# } else {
# Send the SIGHUP
run_program::rooted($prefix, "/usr/bin/killall", "-HUP", $daemon);
if ($service eq "cups") {
# CUPS needs some time to come up.
- wait_for_cups();
+ printer::services::wait_for_cups();
}
return 1;
}
-sub wait_for_cups {
- # CUPS needs some time to come up. Wait up to 30 seconds, checking
- # whether CUPS is ready.
- my $cupsready = 0;
- my $i;
- for ($i = 0; $i < 30; $i++) {
- run_program::rooted($prefix, "/usr/bin/lpstat", "-r");
- if (($? >> 8) != 0) {
- # CUPS is not ready, continue
- sleep 1;
- } else {
- # CUPS is ready, quit
- $cupsready = 1;
- last;
- }
- }
- return $cupsready;
-}
sub assure_device_is_available_for_cups {
# Checks whether CUPS already "knows" a certain port, it does not
@@ -312,285 +139,6 @@ sub assure_device_is_available_for_cups {
return $result;
}
-sub network_running {
- # If the network is not running return 0, otherwise 1.
- local *F;
- open F, ($::testing ? $prefix : "chroot $prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; /sbin/ifconfig\" |" or
- die "Could not run \"ifconfig\"!";
- while (my $line = <F>) {
- if (($line !~ /^lo\s+/) && # The loopback device can have been
- # started by the spooler's startup script
- ($line =~ /^(\S+)\s+/)) { # In this line starts an entry for a
- # running network
- close F;
- return 1;
- }
- }
- close F;
- return 0;
-}
-
-sub getSNMPModel {
-
- my ($host) = @_;
- my $manufacturer = "";
- my $model = "";
- my $description = "";
- my $serialnumber = "";
-
- # SNMP request to auto-detect model
- local *F;
- open F, ($::testing ? $prefix : "chroot $prefix/ ") .
- "/bin/sh -c \"scli -1 -c 'show printer info' $host\" |" or
- return { CLASS => 'PRINTER',
- MODEL => N("Unknown Model"),
- MANUFACTURER => "",
- DESCRIPTION => "",
- SERIALNUMBER => ""
- };
- while (my $l = <F>) {
- chomp $l;
- if (($l =~ /^\s*Manufacturer:\s*(\S.*)$/i) &&
- ($l =~ /^\s*Vendor:\s*(\S.*)$/i)) {
- $manufacturer = $1;
- $manufacturer =~ s/Hewlett[-\s_]Packard/HP/;
- $manufacturer =~ s/HEWLETT[-\s_]PACKARD/HP/;
- } elsif ($l =~ /^\s*Model:\s*(\S.*)$/i) {
- $model = $1;
- } elsif ($l =~ /^\s*Description:\s*(\S.*)$/i) {
- $description = $1;
- $description =~ s/Hewlett[-\s_]Packard/HP/;
- $description =~ s/HEWLETT[-\s_]PACKARD/HP/;
- } elsif ($l =~ /^\s*Serial\s*Number:\s*(\S.*)$/i) {
- $serialnumber = $1;
- }
- }
- close F;
-
- # Was there a manufacturer and a model in the output?
- # If not, get them from the description
- if (($manufacturer eq "") || ($model eq "")) {
- if ($description =~ /^\s*(\S*)\s+(\S.*)$/) {
- if ($manufacturer eq "") {
- $manufacturer = $1;
- }
- if ($model eq "") {
- $model = $2;
- }
- }
- # No description field? Make one out of manufacturer and model.
- } elsif ($description eq "") {
- $description = "$manufacturer $model";
- }
-
- # We couldn't determine a model
- if ($model eq "") {
- $model = N("Unknown Model");
- }
-
- # Remove trailing spaces
- $manufacturer =~ s/(\S+)\s+$/$1/;
- $model =~ s/(\S+)\s+$/$1/;
- $description =~ s/(\S+)\s+$/$1/;
- $serialnumber =~ s/(\S+)\s+$/$1/;
-
- # Now we have all info for one printer
- # Store this auto-detection result in the data structure
- return { CLASS => 'PRINTER',
- MODEL => $model,
- MANUFACTURER => $manufacturer,
- DESCRIPTION => $description,
- SERIALNUMBER => $serialnumber
- };
-}
-
-sub getSMBPrinterShares {
-
- my ($host) = @_;
-
- # SMB request to auto-detect shares
- local *F;
- open F, ($::testing ? "" : "chroot $prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; smbclient -N -L $host\" |" or return ();
- my $insharelist = 0;
- my @shares;
- while (my $l = <F>) {
- chomp $l;
- if ($l =~ /^\s*Sharename\s+Type\s+Comment\s*$/i) {
- $insharelist = 1;
- } elsif ($l =~ /^\s*Server\s+Comment\s*$/i) {
- $insharelist = 0;
- } elsif (($l =~ /^\s*(\S+)\s+Printer\s*(.*)$/i) &&
- ($insharelist)) {
- my $name = $1;
- my $description = $2;
- $description =~ s/^(\s*)//;
- push (@shares, { name => $name, description => $description });
- }
- }
- close F;
-
- return @shares;
-}
-
-sub getIPsInLocalNetworks {
-
- # subroutine determines the list of all hosts reachable in the local
- # networks by means of pinging the broadcast addresses.
-
- # Return an empty list if no network is running
- if (!network_running()) {
- return ();
- }
-
- # Read the output of "ifconfig" to determine the broadcast addresses of
- # the local networks
- my $dev_is_localnet = 0;
- my @local_bcasts;
- my $current_bcast = "";
-
- local *IFCONFIG_OUT;
- open IFCONFIG_OUT, ($::testing ? "" : "chroot $prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; ifconfig\" |" or return ();
- while (my $readline = <IFCONFIG_OUT>) {
- # New entry ...
- if ($readline =~ /^(\S+)\s/) {
- my $dev = $1;
- # ... for a local network (eth = ethernet,
- # vmnet = VMWare,
- # ethernet card connected to ISP excluded)?
- $dev_is_localnet = (($dev =~ /^eth/) || ($dev =~ /^vmnet/));
- # delete previous address
- $current_bcast = "";
- }
- # Are we in the important line now?
- if ($readline =~ /\sBcast:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\s/) {
- # Rip out the broadcast IP address
- $current_bcast = $1;
-
- # Are we in an entry for a local network?
- if ($dev_is_localnet == 1) {
- # Store current IP address
- push @local_bcasts, $current_bcast;
- }
- }
- }
- close(IFCONFIG_OUT);
-
- my @addresses;
- # Now ping all broadcast addresses and additionally "nmblookup" the
- # networks (to find Windows servers which do not answer to ping)
- foreach my $bcast (@local_bcasts) {
- local *F;
- open F, ($::testing ? "" : "chroot $prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; ping -w 1 -b -n $bcast | cut -f 4 -d ' ' | sed s/:// | egrep '^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+' | uniq | sort\" |"
- or next;
- local $_;
- while (<F>) { chomp; push @addresses, $_ }
- close F;
- if (-x "/usr/bin/nmblookup") {
- local *F;
- open F, ($::testing ? "" : "chroot $prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; nmblookup -B $bcast \\* | cut -f 1 -d ' ' | egrep '^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+' | uniq | sort\" |"
- or next;
- local $_;
- while (<F>) { chomp;
- push @addresses, $_ if !(member($_,@addresses)) }
- }
- }
-
- @addresses;
-}
-
-sub whatNetPrinter {
-
- my ($network, $smb) = @_;
-
- my $i;
- my @res;
-
- # Which ports should be scanned?
- my @portstoscan;
- push @portstoscan, "139" if $smb;
- push @portstoscan, "4010", "4020", "4030", "5503", "9100-9104" if $network;
-
- return () if $#portstoscan < 0;
- my $portlist = join (",", @portstoscan);
-
- # Which hosts should be scanned?
- # (Applying nmap to a whole network is very time-consuming, because nmap
- # waits for a certain timeout period on non-existing hosts, so we get a
- # lists of existing hosts by pinging the broadcast addresses for existing
- # hosts and then scanning only them, which is much faster)
- my @hostips = getIPsInLocalNetworks();
- return () if $#hostips < 0;
- my $hostlist = join (" ", @hostips);
-
- # Scan network for printers, the timeout settings are there to avoid
- # delays caused by machines blocking their ports with a firewall
- local *F;
- open F, ($::testing ? "" : "chroot $prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; nmap -r -P0 --host_timeout 400 --initial_rtt_timeout 200 -p $portlist $hostlist\" |"
- or return @res;
- my $host = "";
- my $ip = "";
- my $port = "";
- my $modelinfo = "";
- while (my $line = <F>) {
- chomp $line;
-
- # head line of the report of a host with the ports in question open
- #if ($line =~ m/^\s*Interesting\s+ports\s+on\s+(\S*)\s*\(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\)\s*:\s*$/i) {
- if ($line =~ m/^\s*Interesting\s+ports\s+on\s+(\S*)\s*\((\S+)\)\s*:\s*$/i) {
- $host = $1;
- $ip = $2;
- if ($host eq "") {
- $host = $ip;
- }
- $port = "";
-
- undef $modelinfo;
-
- } elsif ($line =~ m/^\s*(\d+)\/\S+\s+open\s+/i) {
- next if $ip eq "";
- $port = $1;
-
- # Now we have all info for one printer
- # Store this auto-detection result in the data structure
-
- # Determine the protocol by the port number
-
- # SMB/Windows
- if ($port eq "139") {
- my @shares = getSMBPrinterShares($ip);
- foreach my $share (@shares) {
- push @res, { port => "smb://$host/$share->{name}",
- val => { CLASS => 'PRINTER',
- MODEL => N("Unknown Model"),
- MANUFACTURER => "",
- DESCRIPTION =>
- "$share->{description}",
- SERIALNUMBER => ""
- }
- };
- }
- } else {
- if (!defined($modelinfo)) {
- # SNMP request to auto-detect model
- $modelinfo = getSNMPModel ($ip);
- }
- if (defined($modelinfo)) {
- push @res, { port => "socket://$host:$port",
- val => $modelinfo
- };
- }
- }
- }
- }
- close F;
- @res;
-}
sub spooler_in_security_level {
# Was the current spooler already added to the current security level?
@@ -626,41 +174,6 @@ sub add_spooler_to_security_level {
return 1;
}
-sub files_exist {
- my @files = @_;
- foreach my $file (@files) {
- return 0 if ! -f "$prefix$file";
- }
- return 1;
-}
-
-sub set_alternative {
- my ($command, $executable) = @_;
- local *F;
- # Read the list of executables for the given command to find the number
- # of the desired executable
- open F, ($::testing ? $prefix : "chroot $prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; /bin/echo | update-alternatives --config $command \" |" or
- die "Could not run \"update-alternatives\"!";
- my $choice = 0;
- while (my $line = <F>) {
- chomp $line;
- if ($line =~ m/^[\* ][\+ ]\s*([0-9]+)\s+(\S+)\s*$/) { # list entry?
- if ($2 eq $executable) {
- $choice = $1;
- last;
- }
- }
- }
- close F;
- # If the executable was found, assign the command to it
- if ($choice > 0) {
- system(($::testing ? $prefix : "chroot $prefix/ ") .
- "/bin/sh -c \"/bin/echo $choice | update-alternatives --config $command > /dev/null 2>&1\"");
- }
- return 1;
-}
-
sub pdq_panic_button {
my $setting = $_[0];
if (-f "$prefix/usr/sbin/pdqpanicbutton") {
@@ -707,7 +220,7 @@ sub read_configured_queues($) {
my ($printer) = @_;
my @QUEUES;
# Get the default spooler choice from the config file
- $printer->{SPOOLER} ||= get_default_spooler();
+ $printer->{SPOOLER} ||= printer::default::get_spooler();
if (!$printer->{SPOOLER}) {
#- Find the first spooler where there are queues
foreach my $spooler (qw(cups pdq lprng lpd)) {
@@ -717,9 +230,7 @@ sub read_configured_queues($) {
$service = "lpd";
}
if ($service ne "pdq") {
- if (!service_running($service)) {
- next;
- }
+ next unless services::is_service_running($service);
# daemon is running, spooler found
$printer->{SPOOLER} = $spooler;
}
@@ -1205,7 +716,7 @@ sub set_cups_autoconf {
output($file, @file_content);
# Restart CUPS
- restart_service("cups");
+ printer::services::restart("cups");
return 1;
}
@@ -1259,28 +770,6 @@ sub get_usermode {
return 0;
}
-sub set_default_printer {
- my ($printer) = $_[0];
- run_program::rooted($prefix, "foomatic-configure",
- "-D", "-q", "-s", $printer->{SPOOLER},
- "-n", $printer->{DEFAULT}) or return 0;
- return 1;
-}
-
-sub get_default_printer {
- my $printer = $_[0];
- local *F;
- open F, ($::testing ? $prefix : "chroot $prefix/ ") .
- "foomatic-configure -Q -q -s $printer->{SPOOLER} |" or return undef;
- my $line;
- while ($line = <F>) {
- if ($line =~ m!^\s*<defaultqueue>(.*)</defaultqueue>\s*$!) {
- return $1;
- }
- }
- return undef;
-}
-
sub read_cupsd_conf {
cat_("$prefix/etc/cups/cupsd.conf");
}
@@ -1290,7 +779,7 @@ sub write_cupsd_conf {
output("$prefix/etc/cups/cupsd.conf", @cupsd_conf);
#- restart cups after updating configuration.
- restart_service("cups");
+ printer::services::restart("cups");
}
sub read_printers_conf {
@@ -1390,7 +879,7 @@ sub poll_ppd_base {
#- if cups continue to modify it (because it reads the ppd files available), the
#- poll_ppd_base program simply cores :-)
run_program::rooted($prefix, "ifconfig lo 127.0.0.1"); #- else cups will not be happy! and ifup lo don't run ?
- start_not_running_service("cups");
+ printer::services::start_not_running_service("cups");
my $driversthere = scalar(keys %thedb);
foreach (1..60) {
local *PPDS; open PPDS, ($::testing ? $prefix : "chroot $prefix/ ") . "/usr/bin/poll_ppd_base -a |";
@@ -1591,7 +1080,7 @@ sub restart_queue($) {
foreach ($printer->{SPOOLER}) {
/cups/ && do {
#- restart cups.
- restart_service("cups");
+ printer::services::restart("cups");
last };
/lpr|lprng/ && do {
#- restart lpd.
@@ -1600,7 +1089,7 @@ sub restart_queue($) {
kill 'TERM', $pidlpd if $pidlpd;
unlink "$prefix$_";
}
- restart_service("lpd"); sleep 1;
+ printer::services::restart("lpd"); sleep 1;
last };
}
# Kill the jobs
@@ -1846,7 +1335,7 @@ sub configure_hpoj {
($device =~ /\/dev\/lp/) ||
($device =~ /printers/)) {
$bus = "par";
- $address_arg = parport_addr($device);
+ $address_arg = printer::detect::parport_addr($device);
$address_arg =~ /^\s*-base\s+(\S+)/;
eval ("$base_address = $1");
} elsif ($device =~ /socket/) {
@@ -1877,7 +1366,7 @@ sub configure_hpoj {
# Check if the device is really an HP multi-function device
if ($bus ne "hpjd") {
# Start ptal-mlcd daemon for locally connected devices
- stop_service("hpoj");
+ services::stop("hpoj");
run_program::rooted($prefix,
"ptal-mlcd", "$bus:probe", "-device",
$device, split(' ',$address_arg));
@@ -1926,7 +1415,7 @@ sub configure_hpoj {
}
close F;
}
- start_service("hpoj");
+ printer::services::start("hpoj");
}
last;
}
@@ -2089,31 +1578,12 @@ sub configure_hpoj {
readOneDevice ($ptaldevice);
# Restart HPOJ
- restart_service("hpoj");
+ printer::services::restart("hpoj");
# Return HPOJ device name to form the URI
return $ptaldevice;
}
-sub parport_addr {
- # auto-detect the parallel port addresses
- my ($device) = @_;
- $device =~ m!^/dev/lp(\d+)$! or
- $device =~ m!^/dev/printers/(\d+)$!;
- my $portnumber = $1;
- my $parport_addresses =
- `cat /proc/sys/dev/parport/parport$portnumber/base-addr`;
- my $address_arg;
- if ($parport_addresses =~ /^\s*(\d+)\s+(\d+)\s*$/) {
- $address_arg = sprintf(" -base 0x%x -basehigh 0x%x", $1, $2);
- } elsif ($parport_addresses =~ /^\s*(\d+)\s*$/) {
- $address_arg = sprintf(" -base 0x%x", $1);
- } else {
- $address_arg = "";
- }
- return $address_arg;
-}
-
sub config_sane {
# Add HPOJ backend to /etc/sane.d/dll.conf if needed (no individual
# config file /etc/sane.d/hpoj.conf necessary, the HPOJ driver finds the
@@ -2192,33 +1662,33 @@ RIGHTDRIVE=\" \"
sub configureapplications {
my ($printer) = @_;
setcupslink ($printer);
- configurestaroffice($printer);
- configureopenoffice($printer);
- configuregimp($printer);
+ printer::office::configureoffice('Star Office', $printer);
+ printer::office::configureoffice('OpenOffice.Org', $printer);
+ printer::gimp::configure($printer);
}
sub addcupsremotetoapplications {
my ($printer, $queue) = @_;
setcupslink ($printer);
- return (addcupsremotetostaroffice($printer, $queue) &&
- addcupsremotetoopenoffice($printer, $queue) &&
- addcupsremotetogimp($printer, $queue));
+ return (printer::office::add_cups_remote_to_office('Star Office', $printer, $queue) &&
+ printer::office::add_cups_remote_to_office('OpenOffice.Org', $printer, $queue) &&
+ printer::gimp::addcupsremoteto($printer, $queue));
}
sub removeprinterfromapplications {
my ($printer, $queue) = @_;
setcupslink ($printer);
- return (removeprinterfromstaroffice($printer, $queue) &&
- removeprinterfromopenoffice($printer, $queue) &&
- removeprinterfromgimp($printer, $queue));
+ return (printer::office::remove_printer_from_office('Star Office', $printer, $queue) &&
+ printer::office::remove_printer_from_office('OpenOffice.Org', $printer, $queue) &&
+ printer::gimp::removeprinterfrom($printer, $queue));
}
sub removelocalprintersfromapplications {
my ($printer) = @_;
setcupslink ($printer);
- removelocalprintersfromstaroffice($printer);
- removelocalprintersfromopenoffice($printer);
- removelocalprintersfromgimp($printer);
+ printer::office::remove_local_printers_from_office('Star Office', $printer);
+ printer::office::remove_local_printers_from_office('OpenOffice.Org', $printer);
+ printer::gimp::removelocalprintersfrom($printer);
}
sub setcupslink {
@@ -2230,1077 +1700,5 @@ sub setcupslink {
return 1;
}
-sub getcupsremotequeues {
- # The following code reads in a list of all remote printers which the
- # local CUPS daemon knows due to broadcasting of remote servers or
- # "BrowsePoll" entries in the local /etc/cups/cupsd.conf
- local *F;
- open F, ($::testing ? $prefix : "chroot $prefix/ ") .
- "lpstat -v |" or return ();
- my @printerlist;
- my $line;
- while ($line = <F>) {
- if ($line =~ m/^\s*device\s+for\s+([^:\s]+):\s*(\S+)\s*$/) {
- my $queuename = $1;
- if (($2 =~ m!^ipp://([^/:]+)[:/]!) &&
- (!$printer->{configured}{$queuename})) {
- my $server = $1;
- push (@printerlist, "$queuename|$server");
- }
- }
- }
- close F;
- return @printerlist;
-}
-
-# ------------------------------------------------------------------
-# Star Offica/OpenOffice.org
-# ------------------------------------------------------------------
-
-sub configurestaroffice {
- my ($printer) = @_;
- # Do we have Star Office installed?
- my $configfilename = findsofficeconfigfile();
- return 1 if !$configfilename;
- $configfilename =~ m!^(.*)/share/xp3/Xpdefaults$!;
- my $configprefix = $1;
- # Load Star Office printer config file
- my $configfilecontent = readsofficeconfigfile($configfilename);
- # Update remote CUPS queues
- if (0 && ($printer->{SPOOLER} eq "cups") &&
- ((-x "$prefix/usr/bin/curl") || (-x "$prefix/usr/bin/wget"))) {
- my @printerlist = getcupsremotequeues();
- foreach my $listentry (@printerlist) {
- next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
- my $queue = $1;
- my $server = $2;
- if (-x "$prefix/usr/bin/wget") {
- eval(run_program::rooted
- ($prefix, "/usr/bin/wget", "-O",
- "/etc/foomatic/$queue.ppd",
- "http://$server:631/printers/$queue.ppd"));
- } else {
- eval(run_program::rooted
- ($prefix, "/usr/bin/curl", "-o",
- "/etc/foomatic/$queue.ppd",
- "http://$server:631/printers/$queue.ppd"));
- }
- if (-r "$prefix/etc/foomatic/$queue.ppd") {
- $configfilecontent =
- makestarofficeprinterentry($printer, $queue,
- $configprefix,
- $configfilecontent);
- }
- }
- }
- # Update local printer queues
- foreach my $queue (keys(%{$printer->{configured}})) {
- # Check if we have a PPD file
- if (! -r "$prefix/etc/foomatic/$queue.ppd") {
- if (-r "$prefix/etc/cups/ppd/$queue.ppd") {
- # If we have a PPD file in the CUPS config dir, link to it
- run_program::rooted($prefix,
- "ln", "-sf",
- "/etc/cups/ppd/$queue.ppd",
- "/etc/foomatic/$queue.ppd");
- } elsif (-r "$prefix/usr/share/postscript/ppd/$queue.ppd") {
- # Check PPD directory of GPR, too
- run_program::rooted($prefix,
- "ln", "-sf",
- "/usr/share/postscript/ppd/$queue.ppd",
- "/etc/foomatic/$queue.ppd");
- } else {
- # No PPD file at all? We cannot set up this printer
- next;
- }
- }
- $configfilecontent =
- makestarofficeprinterentry($printer, $queue, $configprefix,
- $configfilecontent);
- }
- # Patch PostScript output to print Euro symbol correctly also for
- # the "Generic Printer"
- $configfilecontent = removeentry
- ("ports", "default_queue=", $configfilecontent);
- $configfilecontent = addentry
- ("ports",
- "default_queue=/usr/bin/perl -p -e \"s=16#80 /euro=16#80 /Euro=\" | /usr/bin/$lprcommand{$printer->{SPOOLER}{print_command}}",
- $configfilecontent);
- # Write back Star Office configuration file
- return writesofficeconfigfile($configfilename, $configfilecontent);
-}
-
-sub configureopenoffice {
- my ($printer) = @_;
- # Do we have OpenOffice.org installed?
- my $configfilename = findopenofficeconfigfile();
- return 1 if !$configfilename;
- $configfilename =~ m!^(.*)/share/psprint/psprint.conf$!;
- my $configprefix = $1;
- # Load OpenOffice.org printer config file
- my $configfilecontent = readsofficeconfigfile($configfilename);
- # Update remote CUPS queues
- if (0 && ($printer->{SPOOLER} eq "cups") &&
- ((-x "$prefix/usr/bin/curl") || (-x "$prefix/usr/bin/wget"))) {
- my @printerlist = getcupsremotequeues();
- foreach my $listentry (@printerlist) {
- next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
- my $queue = $1;
- my $server = $2;
- if (-x "$prefix/usr/bin/wget") {
- eval(run_program::rooted
- ($prefix, "/usr/bin/wget", "-O",
- "/etc/foomatic/$queue.ppd",
- "http://$server:631/printers/$queue.ppd"));
- } else {
- eval(run_program::rooted
- ($prefix, "/usr/bin/curl", "-o",
- "/etc/foomatic/$queue.ppd",
- "http://$server:631/printers/$queue.ppd"));
- }
- if (-r "$prefix/etc/foomatic/$queue.ppd") {
- $configfilecontent =
- makeopenofficeprinterentry($printer, $queue,
- $configprefix,
- $configfilecontent);
- }
- }
- }
- # Update local printer queues
- foreach my $queue (keys(%{$printer->{configured}})) {
- # Check if we have a PPD file
- if (! -r "$prefix/etc/foomatic/$queue.ppd") {
- if (-r "$prefix/etc/cups/ppd/$queue.ppd") {
- # If we have a PPD file in the CUPS config dir, link to it
- run_program::rooted($prefix,
- "ln", "-sf",
- "/etc/cups/ppd/$queue.ppd",
- "/etc/foomatic/$queue.ppd");
- } elsif (-r "$prefix/usr/share/postscript/ppd/$queue.ppd") {
- # Check PPD directory of GPR, too
- run_program::rooted($prefix,
- "ln", "-sf",
- "/usr/share/postscript/ppd/$queue.ppd",
- "/etc/foomatic/$queue.ppd");
- } else {
- # No PPD file at all? We cannot set up this printer
- next;
- }
- }
- $configfilecontent =
- makeopenofficeprinterentry($printer, $queue, $configprefix,
- $configfilecontent);
- }
- # Patch PostScript output to print Euro symbol correctly also for
- # the "Generic Printer"
- $configfilecontent = removeentry
- ("Generic Printer", "Command=", $configfilecontent);
- $configfilecontent = addentry
- ("Generic Printer",
- "Command=/usr/bin/perl -p -e \"s=/euro /unused=/Euro /unused=\" | /usr/bin/$lprcommand{$printer->{SPOOLER}{print_command}}",
- $configfilecontent);
- # Write back OpenOffice.org configuration file
- return writesofficeconfigfile($configfilename, $configfilecontent);
-}
-
-sub addcupsremotetostaroffice {
- my ($printer, $queue) = @_;
- # Do we have Star Office installed?
- my $configfilename = findsofficeconfigfile();
- return 1 if !$configfilename;
- $configfilename =~ m!^(.*)/share/xp3/Xpdefaults$!;
- my $configprefix = $1;
- # Load Star Office printer config file
- my $configfilecontent = readsofficeconfigfile($configfilename);
- # Update remote CUPS queues
- if (($printer->{SPOOLER} eq "cups") &&
- ((-x "$prefix/usr/bin/curl") || (-x "$prefix/usr/bin/wget"))) {
- my @printerlist = getcupsremotequeues();
- foreach my $listentry (@printerlist) {
- next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
- my $q = $1;
- next if $q ne $queue;
- my $server = $2;
- # Remove server name from queue name
- $q =~ s/^([^@]*)@.*$/$1/;
- if (-x "$prefix/usr/bin/wget") {
- eval(run_program::rooted
- ($prefix, "/usr/bin/wget", "-O",
- "/etc/foomatic/$queue.ppd",
- "http://$server:631/printers/$q.ppd"));
- } else {
- eval(run_program::rooted
- ($prefix, "/usr/bin/curl", "-o",
- "/etc/foomatic/$queue.ppd",
- "http://$server:631/printers/$q.ppd"));
- }
- # Does the file exist and is it not an error message?
- if ((-r "$prefix/etc/foomatic/$queue.ppd") &&
- (cat_("$prefix/etc/foomatic/$queue.ppd") =~
- /^\*PPD-Adobe/)) {
- $configfilecontent =
- makestarofficeprinterentry($printer, $queue,
- $configprefix,
- $configfilecontent);
- } else {
- unlink ("$prefix/etc/foomatic/$queue.ppd");
- return 0;
- }
- last;
- }
- }
- # Write back Star Office configuration file
- return writesofficeconfigfile($configfilename, $configfilecontent);
-}
-
-sub addcupsremotetoopenoffice {
- my ($printer, $queue) = @_;
- # Do we have OpenOffice.org installed?
- my $configfilename = findopenofficeconfigfile();
- return 1 if !$configfilename;
- $configfilename =~ m!^(.*)/share/psprint/psprint.conf$!;
- my $configprefix = $1;
- # Load OpenOffice.org printer config file
- my $configfilecontent = readsofficeconfigfile($configfilename);
- # Update remote CUPS queues
- if (($printer->{SPOOLER} eq "cups") &&
- ((-x "$prefix/usr/bin/curl") || (-x "$prefix/usr/bin/wget"))) {
- my @printerlist = getcupsremotequeues();
- foreach my $listentry (@printerlist) {
- next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
- my $q = $1;
- next if $q ne $queue;
- my $server = $2;
- # Remove server name from queue name
- $q =~ s/^([^@]*)@.*$/$1/;
- if (-x "$prefix/usr/bin/wget") {
- eval(run_program::rooted
- ($prefix, "/usr/bin/wget", "-O",
- "/etc/foomatic/$queue.ppd",
- "http://$server:631/printers/$q.ppd"));
- } else {
- eval(run_program::rooted
- ($prefix, "/usr/bin/curl", "-o",
- "/etc/foomatic/$queue.ppd",
- "http://$server:631/printers/$q.ppd"));
- }
- # Does the file exist and is it not an error message?
- if ((-r "$prefix/etc/foomatic/$queue.ppd") &&
- (cat_("$prefix/etc/foomatic/$queue.ppd") =~
- /^\*PPD-Adobe/)) {
- $configfilecontent =
- makeopenofficeprinterentry($printer, $queue,
- $configprefix,
- $configfilecontent);
- } else {
- unlink ("$prefix/etc/foomatic/$queue.ppd");
- return 0;
- }
- }
- }
- # Write back OpenOffice.org configuration file
- return writesofficeconfigfile($configfilename, $configfilecontent);
-}
-
-sub removeprinterfromstaroffice {
- my ($printer, $queue) = @_;
- # Do we have Star Office installed?
- my $configfilename = findsofficeconfigfile();
- return 1 if !$configfilename;
- $configfilename =~ m!^(.*)/share/xp3/Xpdefaults$!;
- my $configprefix = $1;
- # Load Star Office printer config file
- my $configfilecontent = readsofficeconfigfile($configfilename);
- # Remove the printer entry
- $configfilecontent =
- removestarofficeprinterentry($printer, $queue, $configprefix,
- $configfilecontent);
- # Write back Star Office configuration file
- return writesofficeconfigfile($configfilename, $configfilecontent);
-}
-
-sub removeprinterfromopenoffice {
- my ($printer, $queue) = @_;
- # Do we have OpenOffice.org installed?
- my $configfilename = findopenofficeconfigfile();
- return 1 if !$configfilename;
- $configfilename =~ m!^(.*)/share/psprint/psprint.conf$!;
- my $configprefix = $1;
- # Load OpenOffice.org printer config file
- my $configfilecontent = readsofficeconfigfile($configfilename);
- # Remove the printer entry
- $configfilecontent =
- removeopenofficeprinterentry($printer, $queue, $configprefix,
- $configfilecontent);
- # Write back OpenOffice.org configuration file
- return writesofficeconfigfile($configfilename, $configfilecontent);
-}
-
-sub removelocalprintersfromstaroffice {
- my ($printer) = @_;
- # Do we have Star Office installed?
- my $configfilename = findsofficeconfigfile();
- return 1 if !$configfilename;
- $configfilename =~ m!^(.*)/share/xp3/Xpdefaults$!;
- my $configprefix = $1;
- # Load Star Office printer config file
- my $configfilecontent = readsofficeconfigfile($configfilename);
- # Remove the printer entries
- foreach my $queue (keys(%{$printer->{configured}})) {
- $configfilecontent =
- removestarofficeprinterentry($printer, $queue, $configprefix,
- $configfilecontent);
- }
- # Write back Star Office configuration file
- return writesofficeconfigfile($configfilename, $configfilecontent);
-}
-
-sub removelocalprintersfromopenoffice {
- my ($printer) = @_;
- # Do we have OpenOffice.org installed?
- my $configfilename = findopenofficeconfigfile();
- return 1 if !$configfilename;
- $configfilename =~ m!^(.*)/share/psprint/psprint.conf$!;
- my $configprefix = $1;
- # Load OpenOffice.org printer config file
- my $configfilecontent = readsofficeconfigfile($configfilename);
- # Remove the printer entries
- foreach my $queue (keys(%{$printer->{configured}})) {
- $configfilecontent =
- removeopenofficeprinterentry($printer, $queue, $configprefix,
- $configfilecontent);
- }
- # Write back OpenOffice.org configuration file
- return writesofficeconfigfile($configfilename, $configfilecontent);
-}
-
-sub makestarofficeprinterentry {
- my ($printer, $queue, $configprefix, $configfile) = @_;
- # Set default printer
- if ($queue eq $printer->{DEFAULT}) {
- $configfile = removeentry("windows", "device=", $configfile);
- $configfile = addentry("windows",
- "device=$queue,$queue PostScript,$queue",
- $configfile);
- }
- # Make an entry in the "[devices]" section
- $configfile = removeentry("devices", "$queue=", $configfile);
- $configfile = addentry("devices",
- "$queue=$queue PostScript,$queue",
- $configfile);
- # Make an entry in the "[ports]" section
- # The "perl" command patches the PostScript output to print the Euro
- # symbol correctly.
- $configfile = removeentry("ports", "$queue=", $configfile);
- $configfile = addentry("ports",
- "$queue=/usr/bin/perl -p -e \"s=16#80 /euro=16#80 /Euro=\" | /usr/bin/$lprcommand{$printer->{SPOOLER}{print_command}} -P $queue",
- $configfile);
- # Make printer's section
- $configfile = addsection("$queue,PostScript,$queue", $configfile);
- # Load PPD file
- my $ppd = cat_("$prefix/etc/foomatic/$queue.ppd");
- # Set the PostScript level
- my $pslevel;
- if ($ppd =~ /^\s*\*LanguageLevel:\s*\"?([^\s\"]+)\"?\s*$/m) {
- $pslevel = $1;
- $pslevel = "2" if $pslevel eq "3";
- } else {
- $pslevel = "2";
- }
- $configfile = removeentry("$queue.PostScript.$queue",
- "Level=", $configfile);
- $configfile = addentry("$queue.PostScript.$queue",
- "Level=$pslevel", $configfile);
- # Set Color/BW
- my $color;
- if ($ppd =~ /^\s*\*ColorDevice:\s*\"?([Tt]rue)\"?\s*$/m) {
- $color = "1";
- } else {
- $color = "0";
- }
- $configfile = removeentry("$queue.PostScript.$queue",
- "BitmapColor=", $configfile);
- $configfile = addentry("$queue.PostScript.$queue",
- "BitmapColor=$color", $configfile);
- # Set the default paper size
- if ($ppd =~ /^\s*\*DefaultPageSize:\s*(\S+)\s*$/m) {
- my $papersize = $1;
- $configfile = removeentry("$queue.PostScript.$queue",
- "PageSize=", $configfile);
- $configfile = removeentry("$queue.PostScript.$queue",
- "PPD_PageSize=", $configfile);
- $configfile = addentry("$queue.PostScript.$queue",
- "PageSize=$papersize", $configfile);
- $configfile = addentry("$queue.PostScript.$queue",
- "PPD_PageSize=$papersize", $configfile);
- }
- # Link the PPD file
- run_program::rooted($prefix,
- "ln", "-sf", "/etc/foomatic/$queue.ppd",
- "$configprefix/share/xp3/ppds/$queue.PS");
- return $configfile;
-}
-
-sub makeopenofficeprinterentry {
- my ($printer, $queue, $configprefix, $configfile) = @_;
- # Make printer's section
- $configfile = addsection($queue, $configfile);
- # Load PPD file
- my $ppd = cat_("$prefix/etc/foomatic/$queue.ppd");
- # "PPD_PageSize" line
- if ($ppd =~ /^\s*\*DefaultPageSize:\s*(\S+)\s*$/m) {
- my $papersize = $1;
- $configfile = removeentry($queue,
- "PPD_PageSize=", $configfile);
- $configfile = addentry($queue,
- "PPD_PageSize=$papersize", $configfile);
- }
- # "Command" line
- # The "perl" command patches the PostScript output to print the Euro
- # symbol correctly.
- $configfile = removeentry($queue, "Command=", $configfile);
- $configfile = addentry($queue,
- "Command=/usr/bin/perl -p -e \"s=/euro /unused=/Euro /unused=\" | /usr/bin/$lprcommand{$printer->{SPOOLER}{print_command}} -P $queue",
- $configfile);
- # "Comment" line
- $configfile = removeentry($queue, "Comment=", $configfile);
- if (($printer->{configured}{$queue}) &&
- ($printer->{configured}{$queue}{queuedata}{desc})) {
- $configfile = addentry
- ($queue,
- "Comment=$printer->{configured}{$queue}{queuedata}{desc}",
- $configfile);
- } else {
- $configfile = addentry($queue,
- "Comment=",
- $configfile);
- }
- # "Location" line
- $configfile = removeentry($queue, "Location=", $configfile);
- if (($printer->{configured}{$queue}) &&
- ($printer->{configured}{$queue}{queuedata}{loc})) {
- $configfile = addentry
- ($queue,
- "Location=$printer->{configured}{$queue}{queuedata}{loc}",
- $configfile);
- } else {
- $configfile = addentry($queue,
- "Location=",
- $configfile);
- }
- # "DefaultPrinter" line
- $configfile = removeentry($queue, "DefaultPrinter=", $configfile);
- my $default = "0";
- if ($queue eq $printer->{DEFAULT}) {
- $default = "1";
- # "DefaultPrinter=0" for the "Generic Printer"
- $configfile = removeentry("Generic Printer", "DefaultPrinter=",
- $configfile);
- $configfile = addentry("Generic Printer",
- "DefaultPrinter=0",
- $configfile);
- }
- $configfile = addentry($queue,
- "DefaultPrinter=$default",
- $configfile);
- # "Printer" line
- $configfile = removeentry($queue, "Printer=", $configfile);
- $configfile = addentry($queue,
- "Printer=$queue/$queue",
- $configfile);
- # Link the PPD file
- run_program::rooted($prefix,
- "ln", "-sf", "/etc/foomatic/$queue.ppd",
- "$configprefix/share/psprint/driver/$queue.PS");
- return $configfile;
-}
-
-sub removestarofficeprinterentry {
- my ($printer, $queue, $configprefix, $configfile) = @_;
- # Remove default printer entry
- $configfile = removeentry("windows", "device=$queue,", $configfile);
- # Remove entry in the "[devices]" section
- $configfile = removeentry("devices", "$queue=", $configfile);
- # Remove entry in the "[ports]" section
- $configfile = removeentry("ports", "$queue=", $configfile);
- # Remove "[$queue,PostScript,$queue]" section
- $configfile = removesection("$queue,PostScript,$queue", $configfile);
- # Remove Link of PPD file
- run_program::rooted($prefix,
- "rm", "-f",
- "$configprefix/share/xp3/ppds/$queue.PS");
- return $configfile;
-}
-
-sub removeopenofficeprinterentry {
- my ($printer, $queue, $configprefix, $configfile) = @_;
- # Remove printer's section
- $configfile = removesection($queue, $configfile);
- # Remove Link of PPD file
- run_program::rooted($prefix,
- "rm", "-f",
- "$configprefix/share/psprint/driver/$queue.PS");
- return $configfile;
-}
-
-sub findsofficeconfigfile {
- my @configfilenames =
- ("/usr/lib/*/share/xp3/Xpdefaults",
- "/usr/local/lib/*/share/xp3/Xpdefaults",
- "/usr/local/*/share/xp3/Xpdefaults",
- "/opt/*/share/xp3/Xpdefaults");
- foreach my $configfilename (@configfilenames) {
- local *F;
- if (open F, "ls -r $prefix$configfilename 2> /dev/null |") {
- my $filename = <F>;
- close F;
- if ($filename) {
- if ($prefix ne "") {
- $filename =~ s/^$prefix//;
- }
- # Work around a bug in the "ls" of "busybox". During
- # installation it outputs the mask given on the command line
- # instead of nothing when the mask does not match any file
- next if $filename =~ /\*/;
- return $filename;
- }
- }
- }
- return "";
-}
-
-sub findopenofficeconfigfile {
- my @configfilenames =
- ("/usr/lib/*/share/psprint/psprint.conf",
- "/usr/local/lib/*/share/psprint/psprint.conf",
- "/usr/local/*/share/psprint/psprint.conf",
- "/opt/*/share/psprint/psprint.conf");
- foreach my $configfilename (@configfilenames) {
- local *F;
- if (open F, "ls -r $prefix$configfilename 2> /dev/null |") {
- my $filename = <F>;
- close F;
- if ($filename) {
- if ($prefix ne "") {
- $filename =~ s/^$prefix//;
- }
- # Work around a bug in the "ls" of "busybox". During
- # installation it outputs the mask given on the command line
- # instead of nothing when the mask does not match any file
- next if $filename =~ /\*/;
- return $filename;
- }
- }
- }
- return "";
-}
-
-sub readsofficeconfigfile {
- my ($file) = @_;
- local *F;
- open F, "< $prefix$file" or return "";
- my $filecontent = join("", <F>);
- close F;
- return $filecontent;
-}
-
-sub writesofficeconfigfile {
- my ($file, $filecontent) = @_;
- local *F;
- open F, "> $prefix$file" or return 0;
- print F $filecontent;
- close F;
- return 1;
-}
-
-sub addentry {
- my ($section, $entry, $filecontent) = @_;
- my $sectionfound = 0;
- my $entryinserted = 0;
- my @lines = split("\n", $filecontent);
- foreach (@lines) {
- if (!$sectionfound) {
- if (/^\s*\[\s*$section\s*\]\s*$/) {
- $sectionfound = 1;
- }
- } else {
- if (!/^\s*$/ && !/^\s*;/) { #-#
- $_ = "$entry\n$_";
- $entryinserted = 1;
- last;
- }
- }
- }
- if ($sectionfound && !$entryinserted) {
- push(@lines, $entry);
- }
- return join ("\n", @lines);
-}
-
-sub addsection {
- my ($section, $filecontent) = @_;
- my $entryinserted = 0;
- my @lines = split("\n", $filecontent);
- foreach (@lines) {
- if (/^\s*\[\s*$section\s*\]\s*$/) {
- # section already there, nothing to be done
- return $filecontent;
- }
- }
- return $filecontent . "\n[$section]";
-}
-
-sub removeentry {
- my ($section, $entry, $filecontent) = @_;
- my $sectionfound = 0;
- my $done = 0;
- my @lines = split("\n", $filecontent);
- foreach (@lines) {
- $_ = "$_\n";
- next if $done;
- if (!$sectionfound) {
- if (/^\s*\[\s*$section\s*\]\s*$/) {
- $sectionfound = 1;
- }
- } else {
- if (/^\s*\[.*\]\s*$/) { # Next section
- $done = 1;
- } elsif (/^\s*$entry/) {
- $_ = "";
- $done = 1;
- }
- }
- }
- return join ("", @lines);
-}
-
-sub removesection {
- my ($section, $filecontent) = @_;
- my $sectionfound = 0;
- my $done = 0;
- my @lines = split("\n", $filecontent);
- foreach (@lines) {
- $_ = "$_\n";
- next if $done;
- if (!$sectionfound) {
- if (/^\s*\[\s*$section\s*\]\s*$/) {
- $_ = "";
- $sectionfound = 1;
- }
- } else {
- if (/^\s*\[.*\]\s*$/) { # Next section
- $done = 1;
- } else {
- $_ = "";
- }
- }
- }
- return join ("", @lines);
-}
-
-# ------------------------------------------------------------------
-# GIMP
-# ------------------------------------------------------------------
-
-sub configuregimp {
- my ($printer, $queue) = @_;
- # Do we have files to treat?
- my @configfilenames = findgimpconfigfiles();
- return 1 if $#configfilenames < 0;
- # There is no system-wide config file, treat every user's config file
- foreach my $configfilename (@configfilenames) {
- # Load GIMP's printer config file
- my $configfilecontent = readgimpconfigfile($configfilename);
- # Update local printer queues
- foreach my $queue (keys(%{$printer->{configured}})) {
- # Check if we have a PPD file
- if (! -r "$prefix/etc/foomatic/$queue.ppd") {
- if (-r "$prefix/etc/cups/ppd/$queue.ppd") {
- # If we have a PPD file in the CUPS config dir, link to it
- run_program::rooted($prefix,
- "ln", "-sf",
- "/etc/cups/ppd/$queue.ppd",
- "/etc/foomatic/$queue.ppd");
- } elsif (-r "$prefix/usr/share/postscript/ppd/$queue.ppd") {
- # Check PPD directory of GPR, too
- run_program::rooted
- ($prefix,
- "ln", "-sf",
- "/usr/share/postscript/ppd/$queue.ppd",
- "/etc/foomatic/$queue.ppd");
- } else {
- # No PPD file at all? We cannot set up this printer
- next;
- }
- }
- # Add the printer entry
- if (!isgimpprinterconfigured ($queue, $configfilecontent)) {
- # Remove the old printer entry
- $configfilecontent =
- removegimpprinter($queue, $configfilecontent);
- # Add the new printer entry
- $configfilecontent =
- makegimpprinterentry($printer, $queue,
- $configfilecontent);
- }
- }
- # Default printer
- if ($printer->{DEFAULT}) {
- if ($configfilecontent !~ /^\s*Current\-Printer\s*:/m) {
- $configfilecontent =~
- s/\n/\nCurrent-Printer: $printer->{DEFAULT}\n/s;
- } else {
- $configfilecontent =~ /^\s*Current\-Printer\s*:\s*(\S+)\s*$/m;
- if (!isgimpprinterconfigured ($1, $configfilecontent)) {
- $configfilecontent =~
- s/(Current\-Printer\s*:\s*)\S+/$1$printer->{DEFAULT}/;
- }
- }
- }
- # Write back GIMP's printer configuration file
- writegimpconfigfile($configfilename, $configfilecontent);
- }
- return 1;
-}
-
-sub addcupsremotetogimp {
- my ($printer, $queue) = @_;
- # Do we have files to treat?
- my @configfilenames = findgimpconfigfiles();
- return 1 if $#configfilenames < 0;
- my @printerlist = getcupsremotequeues();
- my $ppdfile = "";
- if (($printer->{SPOOLER} eq "cups") &&
- ((-x "$prefix/usr/bin/curl") || (-x "$prefix/usr/bin/wget"))) {
- foreach my $listentry (@printerlist) {
- next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
- my $q = $1;
- next if $q ne $queue;
- my $server = $2;
- # Remove server name from queue name
- $q =~ s/^([^@]*)@.*$/$1/;
- if (-x "$prefix/usr/bin/wget") {
- eval(run_program::rooted
- ($prefix, "/usr/bin/wget", "-O",
- "/etc/foomatic/$queue.ppd",
- "http://$server:631/printers/$q.ppd"));
- } else {
- eval(run_program::rooted
- ($prefix, "/usr/bin/curl", "-o",
- "/etc/foomatic/$queue.ppd",
- "http://$server:631/printers/$q.ppd"));
- }
- # Does the file exist and is it not an error message?
- if ((-r "$prefix/etc/foomatic/$queue.ppd") &&
- (cat_("$prefix/etc/foomatic/$queue.ppd") =~
- /^\*PPD-Adobe/)) {
- $ppdfile = "/etc/foomatic/$queue.ppd";
- } else {
- unlink ("$prefix/etc/foomatic/$queue.ppd");
- return 0;
- }
- }
- } else {
- return 1;
- }
- # There is no system-wide config file, treat every user's config file
- foreach my $configfilename (@configfilenames) {
- # Load GIMP's printer config file
- my $configfilecontent = readgimpconfigfile($configfilename);
- # Add the printer entry
- if (!isgimpprinterconfigured ($queue, $configfilecontent)) {
- # Remove the old printer entry
- $configfilecontent =
- removegimpprinter($queue, $configfilecontent);
- # Add the new printer entry
- $configfilecontent =
- makegimpprinterentry($printer, $queue,
- $configfilecontent);
- }
- # Write back GIMP's printer configuration file
- writegimpconfigfile($configfilename, $configfilecontent);
- }
- return 1;
-}
-
-sub removeprinterfromgimp {
- my ($printer, $queue) = @_;
- # Do we have files to treat?
- my @configfilenames = findgimpconfigfiles();
- return 1 if $#configfilenames < 0;
- # There is no system-wide config file, treat every user's config file
- foreach my $configfilename (@configfilenames) {
- # Load GIMP's printer config file
- my $configfilecontent = readgimpconfigfile($configfilename);
- # Remove the printer entry
- $configfilecontent =
- removegimpprinter($queue, $configfilecontent);
- # Write back GIMP's printer configuration file
- writegimpconfigfile($configfilename, $configfilecontent);
- }
- return 1;
-}
-
-sub removelocalprintersfromgimp {
- my ($printer) = @_;
- # Do we have files to treat?
- my @configfilenames = findgimpconfigfiles();
- return 1 if $#configfilenames < 0;
- # There is no system-wide config file, treat every user's config file
- foreach my $configfilename (@configfilenames) {
- # Load GIMP's printer config file
- my $configfilecontent = readgimpconfigfile($configfilename);
- # Remove the printer entries
- foreach my $queue (keys(%{$printer->{configured}})) {
- $configfilecontent =
- removegimpprinter($queue, $configfilecontent);
- }
- # Write back GIMP's printer configuration file
- writegimpconfigfile($configfilename, $configfilecontent);
- }
- return 1;
-}
-
-sub makegimpprinterentry {
- my ($printer, $queue, $configfile) = @_;
- # Make printer's section
- $configfile = addgimpprinter($queue, $configfile);
- # Load PPD file
- my $ppd = cat_("$prefix/etc/foomatic/$queue.ppd");
- # Is the printer configured with GIMP-Print?
- my $gimpprintqueue = 0;
- my $gimpprintdriver = "ps2";
- if ($ppd =~ /CUPS\s*\+\s*GIMP\s*\-\s*Print/im) {
- # Native CUPS driver
- $gimpprintqueue = 1;
- $ppd =~ /\s*\*ModelName:\s*\"(\S+)\"\s*$/im;
- $gimpprintdriver = $1;
- } elsif ($ppd =~ /Foomatic\s*\+\s*gimp\s*\-\s*print/im) {
- # GhostScript + Foomatic driver
- $gimpprintqueue = 1;
- $ppd =~
- /'idx'\s*=>\s*'ev\/gimp-print-((escp2|pcl|bjc|lexmark)\-\S*)'/im;
- $gimpprintdriver = $1;
- }
- if ($gimpprintqueue) {
- # Get the paper size from the PPD file
- if ($ppd =~ /^\s*\*DefaultPageSize:\s*(\S+)\s*$/m) {
- my $papersize = $1;
- $configfile = removegimpentry($queue,
- "Media-Size", $configfile);
- $configfile = addgimpentry($queue,
- "Media-Size: $papersize", $configfile);
- }
- $configfile = removegimpentry($queue,
- "PPD-File:", $configfile);
- $configfile = addgimpentry($queue,
- "PPD-File:", $configfile);
- $configfile = removegimpentry($queue,
- "Driver:", $configfile);
- $configfile = addgimpentry($queue,
- "Driver: $gimpprintdriver", $configfile);
- $configfile = removegimpentry($queue,
- "Destination:", $configfile);
- $configfile = addgimpentry($queue,
- "Destination: /usr/bin/$lprcommand{$printer->{SPOOLER}{print_command}} -P $queue -o raw", $configfile);
- } else {
- $configfile = removegimpentry($queue,
- "PPD-File:", $configfile);
- $configfile = addgimpentry($queue,
- "PPD-File: /etc/foomatic/$queue.ppd", $configfile);
- $configfile = removegimpentry($queue,
- "Driver:", $configfile);
- $configfile = addgimpentry($queue,
- "Driver: ps2", $configfile);
- $configfile = removegimpentry($queue,
- "Destination:", $configfile);
- $configfile = addgimpentry($queue,
- "Destination: /usr/bin/$lprcommand{$printer->{SPOOLER}{print_command}} -P $queue", $configfile);
- }
- return $configfile;
-}
-
-sub findgimpconfigfiles {
- my @configfilenames;
- if (-d "$prefix/usr/lib/gimp/1.2") {
- push (@configfilenames, ".gimp-1.2/printrc");
- }
- if (-d "$prefix/usr/lib/gimp/1.3") {
- push (@configfilenames, ".gimp-1.3/printrc");
- }
- my @filestotreat;
- local *PASSWD;
- open PASSWD, "< $prefix/etc/passwd" or die "Cannot read /etc/passwd!\n";
- local $_;
- while (<PASSWD>) {
- chomp;
- if (/^([^:]+):[^:]*:([^:]+):([^:]+):[^:]*:([^:]+):[^:]*$/) {
- my ($username, $uid, $gid, $homedir) = ($1, $2, $3, $4);
- if ((($uid == 0) || ($uid >= 500)) && ($username ne "nobody")) {
- foreach my $file (@configfilenames) {
- my $dir = "$homedir/$file";
- $dir =~ s,/[^/]*$,,;
- next if (-f $dir) && (! -d $dir);
- if (! -d "$prefix$dir") {
- run_program::rooted($prefix,
- "/bin/mkdir", $dir)
- or next;
- run_program::rooted($prefix,
- "/bin/chown", "$uid.$gid", $dir)
- or next;
- }
- if (! -f "$prefix$homedir/$file") {
- local *F;
- open F, "> $prefix$homedir/$file" or next;
- print F "#PRINTRCv1 written by GIMP-PRINT 4.2.2 - 13 Sep 2002\n";
- close F;
- run_program::rooted($prefix,
- "/bin/chown", "$uid.$gid",
- "$homedir/$file")
- or next;
- }
- push (@filestotreat, "$homedir/$file");
- }
- }
- }
- }
- @filestotreat;
-}
-
-sub readgimpconfigfile {
- my ($file) = @_;
- local *F;
- open F, "< $prefix$file" or return "";
- my $filecontent = join("", <F>);
- close F;
- return $filecontent;
-}
-
-sub writegimpconfigfile {
- my ($file, $filecontent) = @_;
- local *F;
- open F, "> $prefix$file" or return 0;
- print F $filecontent;
- close F;
- return 1;
-}
-
-sub addgimpentry {
- my ($section, $entry, $filecontent) = @_;
- my $sectionfound = 0;
- my $entryinserted = 0;
- my @lines = split("\n", $filecontent);
- foreach (@lines) {
- if (!$sectionfound) {
- if (/^\s*Printer\s*:\s*($section)\s*$/) {
- $sectionfound = 1;
- }
- } else {
- if (!/^\s*$/ && !/^\s*;/) { #-#
- $_ = "$entry\n$_";
- $entryinserted = 1;
- last;
- }
- }
- }
- if ($sectionfound && !$entryinserted) {
- push(@lines, $entry);
- }
- return join ("\n", @lines);
-}
-
-sub addgimpprinter {
- my ($section, $filecontent) = @_;
- my $entryinserted = 0;
- my @lines = split("\n", $filecontent);
- foreach (@lines) {
- if (/^\s*Printer\s*:\s*($section)\s*$/) {
- # section already there, nothing to be done
- return $filecontent;
- }
- }
- return $filecontent . "\nPrinter: $section";
-}
-
-sub removegimpentry {
- my ($section, $entry, $filecontent) = @_;
- my $sectionfound = 0;
- my $done = 0;
- my @lines = split("\n", $filecontent);
- foreach (@lines) {
- $_ = "$_\n";
- next if $done;
- if (!$sectionfound) {
- if (/^\s*Printer\s*:\s*($section)\s*$/) {
- $sectionfound = 1;
- }
- } else {
- if (/^\s*Printer\s*:\s*.*\s*$/) { # Next section
- $done = 1;
- } elsif (/^\s*$entry/) {
- $_ = "";
- $done = 1;
- }
- }
- }
- return join ("", @lines);
-}
-
-sub removegimpprinter {
- my ($section, $filecontent) = @_;
- my $sectionfound = 0;
- my $done = 0;
- my @lines = split("\n", $filecontent);
- foreach (@lines) {
- $_ = "$_\n";
- next if $done;
- if (!$sectionfound) {
- if (/^\s*Printer\s*:\s*($section)\s*$/) {
- $_ = "";
- $sectionfound = 1;
- }
- } else {
- if (/^\s*Printer\s*:\s*.*\s*$/) { # Next section
- $done = 1;
- } else {
- $_ = "";
- }
- }
- }
- return join ("", @lines);
-}
-
-sub isgimpprinterconfigured {
- my ($queue, $filecontent) = @_;
- my $sectionfound = 0;
- my $done = 0;
- my $drivernotps2 = 0;
- my $ppdfileset = 0;
- my $nonrawprinting = 0;
- my @lines = split("\n", $filecontent);
- foreach (@lines) {
- last if $done;
- if (!$sectionfound) {
- if (/^\s*Printer\s*:\s*($queue)\s*$/) {
- $sectionfound = 1;
- }
- } else {
- if (/^\s*Printer\s*:\s*.*\s*$/) { # Next section
- $done = 1;
- } elsif (/^\s*Driver:\s*(\S+)\s*$/) {
- $drivernotps2 = ($1 ne "ps2");
- } elsif (/^\s*PPD\-File:\s*(\S+)\s*$/) {
- $ppdfileset = 1;
- } elsif (/^\s*Destination:\s*(\S+.*)$/) {
- $nonrawprinting = ($1 !~ /\-o\s*raw/);
- }
- }
- }
- return 0 if $done && !$sectionfound;
- return 1 if $ppdfileset || $drivernotps2 || $nonrawprinting;
- return 0;
-}
-
-# ------------------------------------------------------------------
1;
diff --git a/perl-install/printer/office.pm b/perl-install/printer/office.pm
new file mode 100644
index 000000000..037d40601
--- /dev/null
+++ b/perl-install/printer/office.pm
@@ -0,0 +1,384 @@
+package printer::office;
+
+use strict;
+use common;
+use run_program;
+use printer::common;
+use printer::cups;
+
+# ------------------------------------------------------------------
+# Star Offica/OpenOffice.org
+# ------------------------------------------------------------------
+
+
+our %suites =
+ (
+ 'Star Office' => {
+ 'make' => \&makestarofficeprinterentry,
+ 'file_name' => '^(.*)/share/psprint/psprint.conf$',
+ 'param' => ["Generic Printer", "Command="],
+ 'perl' => "/usr/bin/perl -p -e \"s=16#80 /euro=16#80 /Euro=\" | /usr/bin/",
+ 'files' => [qw(/usr/lib/*/share/xp3/Xpdefaults
+ /usr/local/lib/*/share/xp3/Xpdefaults
+ /usr/local/*/share/xp3/Xpdefaults
+ /opt/*/share/xp3/Xpdefaults)]
+
+ },
+ 'OpenOffice.Org' => {
+ 'make' => \&makeopenofficeprinterentry,
+ 'file_name' => '^(.*)/share/xp3/Xpdefaults$',
+ 'param' => ["ports", "default_queue="],
+ 'perl' => "usr/bin/perl -p -e \"s=/euro /unused=/Euro /unused=\" | /usr/bin/",
+ 'files' => [qw(/usr/lib/*/share/psprint/psprint.conf
+ /usr/local/lib/*/share/psprint/psprint.conf
+ /usr/local/*/share/psprint/psprint.conf
+ /opt/*/share/psprint/psprint.conf)]
+ }
+ );
+
+sub configureoffice {
+ my ($suite, $printer) = @_;
+ # Do we have Star Office installed?
+ my $configfilename = find_config_file($suite);
+ return 1 if !$configfilename;
+ $configfilename =~ m!$suites{$suite}{file_name}!;
+ my $configprefix = $1;
+ # Load Star Office printer config file
+ my $configfilecontent = readsofficeconfigfile($configfilename);
+ # Update remote CUPS queues
+ if (0 && ($printer->{SPOOLER} eq "cups") &&
+ ((-x "$::prefix/usr/bin/curl") || (-x "$::prefix/usr/bin/wget"))) {
+ my @printerlist = printer::cups::get_remote_queues();
+ foreach my $listentry (@printerlist) {
+ next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
+ my $queue = $1;
+ my $server = $2;
+ if (-x "$::prefix/usr/bin/wget") {
+ eval(run_program::rooted
+ ($::prefix, "/usr/bin/wget", "-O",
+ "/etc/foomatic/$queue.ppd",
+ "http://$server:631/printers/$queue.ppd"));
+ } else {
+ eval(run_program::rooted
+ ($::prefix, "/usr/bin/curl", "-o",
+ "/etc/foomatic/$queue.ppd",
+ "http://$server:631/printers/$queue.ppd"));
+ }
+ if (-r "$::prefix/etc/foomatic/$queue.ppd") {
+ $configfilecontent = $suites{$suite}{make}($printer, $queue, $configprefix, $configfilecontent);
+ }
+ }
+ }
+ # Update local printer queues
+ foreach my $queue (keys(%{$printer->{configured}})) {
+ # Check if we have a PPD file
+ if (! -r "$::prefix/etc/foomatic/$queue.ppd") {
+ if (-r "$::prefix/etc/cups/ppd/$queue.ppd") {
+ # If we have a PPD file in the CUPS config dir, link to it
+ run_program::rooted($::prefix,
+ "ln", "-sf",
+ "/etc/cups/ppd/$queue.ppd",
+ "/etc/foomatic/$queue.ppd");
+ } elsif (-r "$::prefix/usr/share/postscript/ppd/$queue.ppd") {
+ # Check PPD directory of GPR, too
+ run_program::rooted($::prefix,
+ "ln", "-sf",
+ "/usr/share/postscript/ppd/$queue.ppd",
+ "/etc/foomatic/$queue.ppd");
+ } else {
+ # No PPD file at all? We cannot set up this printer
+ next;
+ }
+ }
+ $configfilecontent =
+ $suites{$suite}{make}($printer, $queue, $configprefix,
+ $configfilecontent);
+ }
+ # Patch PostScript output to print Euro symbol correctly also for
+ # the "Generic Printer"
+ my @parameters = $suites{$suite}{param};
+ $configfilecontent =printer::common::removeentry
+ (@parameters, $configfilecontent);
+ $configfilecontent =printer::common::addentry($parameters[0],$parameters[1] . $suites{$suite}{perl} . $printer::data::lprcommand{$printer->{SPOOLER}{print_command}}, $configfilecontent);
+ # Write back Star Office configuration file
+ return writesofficeconfigfile($configfilename, $configfilecontent);
+}
+
+sub add_cups_remote_to_office {
+ my ($suite, $printer, $queue) = @_;
+ # Do we have Star Office installed?
+ my $configfilename = find_config_file($suite);
+ return 1 if !$configfilename;
+ $configfilename =~ m!$suites{$suite}{file_name}!;
+ my $configprefix = $1;
+ # Load Star Office printer config file
+ my $configfilecontent = readsofficeconfigfile($configfilename);
+ # Update remote CUPS queues
+ if (($printer->{SPOOLER} eq "cups") &&
+ ((-x "$::prefix/usr/bin/curl") || (-x "$::prefix/usr/bin/wget"))) {
+ my @printerlist = printer::cups::get_remote_queues();
+ foreach my $listentry (@printerlist) {
+ next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
+ my $q = $1;
+ next if $q ne $queue;
+ my $server = $2;
+ # Remove server name from queue name
+ $q =~ s/^([^@]*)@.*$/$1/;
+ if (-x "$::prefix/usr/bin/wget") {
+ eval(run_program::rooted
+ ($::prefix, "/usr/bin/wget", "-O",
+ "/etc/foomatic/$queue.ppd",
+ "http://$server:631/printers/$q.ppd"));
+ } else {
+ eval(run_program::rooted
+ ($::prefix, "/usr/bin/curl", "-o",
+ "/etc/foomatic/$queue.ppd",
+ "http://$server:631/printers/$q.ppd"));
+ }
+ # Does the file exist and is it not an error message?
+ if ((-r "$::prefix/etc/foomatic/$queue.ppd") &&
+ (cat_("$::prefix/etc/foomatic/$queue.ppd") =~
+ /^\*PPD-Adobe/)) {
+ $configfilecontent =
+ $suites{$suite}{make}($printer, $queue,
+ $configprefix,
+ $configfilecontent);
+ } else {
+ unlink ("$::prefix/etc/foomatic/$queue.ppd");
+ return 0;
+ }
+ last if $suite eq 'Star Office';
+ }
+ }
+ # Write back Star Office configuration file
+ return writesofficeconfigfile($configfilename, $configfilecontent);
+}
+
+sub remove_printer_from_office {
+ my ($suite, $printer, $queue) = @_;
+ # Do we have Star Office installed?
+ my $configfilename = find_config_file($suite);
+ return 1 if !$configfilename;
+ $configfilename =~ m!$suites{$suite}{file_name}!;
+ my $configprefix = $1;
+ # Load Star Office printer config file
+ my $configfilecontent = readsofficeconfigfile($configfilename);
+ # Remove the printer entry
+ $configfilecontent =
+ removestarofficeprinterentry($printer, $queue, $configprefix,
+ $configfilecontent);
+ # Write back Star Office configuration file
+ return writesofficeconfigfile($configfilename, $configfilecontent);
+}
+
+sub remove_local_printers_from_office {
+ my ($suite, $printer) = @_;
+ # Do we have Star Office installed?
+ my $configfilename = find_config_file($suite);
+ return 1 if !$configfilename;
+ $configfilename =~ m!$suites{$suite}{file_name}!;
+ my $configprefix = $1;
+ # Load Star Office printer config file
+ my $configfilecontent = readsofficeconfigfile($configfilename);
+ # Remove the printer entries
+ foreach my $queue (keys(%{$printer->{configured}})) {
+ $configfilecontent =
+ removestarofficeprinterentry($printer, $queue, $configprefix,
+ $configfilecontent);
+ }
+ # Write back Star Office configuration file
+ return writesofficeconfigfile($configfilename, $configfilecontent);
+}
+
+
+sub makestarofficeprinterentry {
+ my ($printer, $queue, $configprefix, $configfile) = @_;
+ # Set default printer
+ if ($queue eq $printer->{DEFAULT}) {
+ $configfile =printer::common::removeentry("windows", "device=", $configfile);
+ $configfile =printer::common::addentry("windows",
+ "device=$queue,$queue PostScript,$queue",
+ $configfile);
+ }
+ # Make an entry in the "[devices]" section
+ $configfile =printer::common::removeentry("devices", "$queue=", $configfile);
+ $configfile =printer::common::addentry("devices",
+ "$queue=$queue PostScript,$queue",
+ $configfile);
+ # Make an entry in the "[ports]" section
+ # The "perl" command patches the PostScript output to print the Euro
+ # symbol correctly.
+ $configfile =printer::common::removeentry("ports", "$queue=", $configfile);
+ $configfile =printer::common::addentry("ports",
+ "$queue=/usr/bin/perl -p -e \"s=16#80 /euro=16#80 /Euro=\" | /usr/bin/$printer::data::lprcommand{$printer->{SPOOLER}{print_command}} -P $queue",
+ $configfile);
+ # Make printer's section
+ $configfile = printer::common::addsection("$queue,PostScript,$queue", $configfile);
+ # Load PPD file
+ my $ppd = cat_("$::prefix/etc/foomatic/$queue.ppd");
+ # Set the PostScript level
+ my $pslevel;
+ if ($ppd =~ /^\s*\*LanguageLevel:\s*\"?([^\s\"]+)\"?\s*$/m) {
+ $pslevel = $1;
+ $pslevel = "2" if $pslevel eq "3";
+ } else { $pslevel = "2" }
+ $configfile =printer::common::removeentry("$queue.PostScript.$queue",
+ "Level=", $configfile);
+ $configfile =printer::common::addentry("$queue.PostScript.$queue",
+ "Level=$pslevel", $configfile);
+ # Set Color/BW
+ my $color = ($ppd =~ /^\s*\*ColorDevice:\s*\"?([Tt]rue)\"?\s*$/m) ? "1" : "0";
+ $configfile =printer::common::removeentry("$queue.PostScript.$queue", "BitmapColor=", $configfile);
+ $configfile =printer::common::addentry("$queue.PostScript.$queue", "BitmapColor=$color", $configfile);
+ # Set the default paper size
+ if ($ppd =~ /^\s*\*DefaultPageSize:\s*(\S+)\s*$/m) {
+ my $papersize = $1;
+ $configfile =printer::common::removeentry("$queue.PostScript.$queue", "PageSize=", $configfile);
+ $configfile =printer::common::removeentry("$queue.PostScript.$queue", "PPD_PageSize=", $configfile);
+ $configfile =printer::common::addentry("$queue.PostScript.$queue", "PageSize=$papersize", $configfile);
+ $configfile =printer::common::addentry("$queue.PostScript.$queue", "PPD_PageSize=$papersize", $configfile);
+ }
+ # Link the PPD file
+ run_program::rooted($::prefix,
+ "ln", "-sf", "/etc/foomatic/$queue.ppd",
+ "$configprefix/share/xp3/ppds/$queue.PS");
+ return $configfile;
+}
+
+sub makeopenofficeprinterentry {
+ my ($printer, $queue, $configprefix, $configfile) = @_;
+ # Make printer's section
+ $configfile = printer::common::addsection($queue, $configfile);
+ # Load PPD file
+ my $ppd = cat_("$::prefix/etc/foomatic/$queue.ppd");
+ # "PPD_PageSize" line
+ if ($ppd =~ /^\s*\*DefaultPageSize:\s*(\S+)\s*$/m) {
+ my $papersize = $1;
+ $configfile = printer::common::removeentry($queue,
+ "PPD_PageSize=", $configfile);
+ $configfile = printer::common::addentry($queue,
+ "PPD_PageSize=$papersize", $configfile);
+ }
+ # "Command" line
+ # The "perl" command patches the PostScript output to print the Euro
+ # symbol correctly.
+ $configfile = printer::common::removeentry($queue, "Command=", $configfile);
+ $configfile = printer::common::addentry($queue,
+ "Command=/usr/bin/perl -p -e \"s=/euro /unused=/Euro /unused=\" | /usr/bin/$printer::data::lprcommand{$printer->{SPOOLER}{print_command}} -P $queue",
+ $configfile);
+ # "Comment" line
+ $configfile = printer::common::removeentry($queue, "Comment=", $configfile);
+ if (($printer->{configured}{$queue}) &&
+ ($printer->{configured}{$queue}{queuedata}{desc})) {
+ $configfile =printer::common::addentry
+ ($queue,
+ "Comment=$printer->{configured}{$queue}{queuedata}{desc}",
+ $configfile);
+ } else {
+ $configfile = printer::common::addentry($queue,
+ "Comment=",
+ $configfile);
+ }
+ # "Location" line
+ $configfile = printer::common::removeentry($queue, "Location=", $configfile);
+ if (($printer->{configured}{$queue}) &&
+ ($printer->{configured}{$queue}{queuedata}{loc})) {
+ $configfile = printer::common::addentry
+ ($queue,
+ "Location=$printer->{configured}{$queue}{queuedata}{loc}",
+ $configfile);
+ } else {
+ $configfile = printer::common::addentry($queue, "Location=", $configfile);
+ }
+ # "DefaultPrinter" line
+ $configfile = printer::common::removeentry($queue, "DefaultPrinter=", $configfile);
+ my $default = "0";
+ if ($queue eq $printer->{DEFAULT}) {
+ $default = "1";
+ # "DefaultPrinter=0" for the "Generic Printer"
+ $configfile = printer::common::removeentry("Generic Printer", "DefaultPrinter=",
+ $configfile);
+ $configfile = printer::common::addentry("Generic Printer",
+ "DefaultPrinter=0",
+ $configfile);
+ }
+ $configfile = printer::common::addentry($queue, "DefaultPrinter=$default", $configfile);
+ # "Printer" line
+ $configfile = printer::common::removeentry($queue, "Printer=", $configfile);
+ $configfile = printer::common::addentry($queue, "Printer=$queue/$queue", $configfile);
+ # Link the PPD file
+ run_program::rooted($::prefix,
+ "ln", "-sf", "/etc/foomatic/$queue.ppd",
+ "$configprefix/share/psprint/driver/$queue.PS");
+ return $configfile;
+}
+
+sub removestarofficeprinterentry {
+ my ($printer, $queue, $configprefix, $configfile) = @_;
+ # Remove default printer entry
+ $configfile = printer::common::removeentry("windows", "device=$queue,", $configfile);
+ # Remove entry in the "[devices]" section
+ $configfile = printer::common::removeentry("devices", "$queue=", $configfile);
+ # Remove entry in the "[ports]" section
+ $configfile = printer::common::removeentry("ports", "$queue=", $configfile);
+ # Remove "[$queue,PostScript,$queue]" section
+ $configfile = printer::common::removesection("$queue,PostScript,$queue", $configfile);
+ # Remove Link of PPD file
+ run_program::rooted($::prefix,
+ "rm", "-f",
+ "$configprefix/share/xp3/ppds/$queue.PS");
+ return $configfile;
+}
+
+sub removeopenofficeprinterentry {
+ my ($printer, $queue, $configprefix, $configfile) = @_;
+ # Remove printer's section
+ $configfile = printer::common::removesection($queue, $configfile);
+ # Remove Link of PPD file
+ run_program::rooted($::prefix,
+ "rm", "-f",
+ "$configprefix/share/psprint/driver/$queue.PS");
+ return $configfile;
+}
+
+sub find_config_file {
+ my ($suite) = @_;
+ my @configfilenames = $suites{$suite}{files};
+ foreach my $configfilename (@configfilenames) {
+ local *F;
+ if (open F, "ls -r $::prefix$configfilename 2> /dev/null |") {
+ my $filename = <F>;
+ close F;
+ if ($filename) {
+ if ($::prefix ne "") {
+ $filename =~ s/^$::prefix//;
+ }
+ # Work around a bug in the "ls" of "busybox". During
+ # installation it outputs the mask given on the command line
+ # instead of nothing when the mask does not match any file
+ next if $filename =~ /\*/;
+ return $filename;
+ }
+ }
+ }
+ return "";
+}
+
+sub readsofficeconfigfile {
+ my ($file) = @_;
+ local *F;
+ open F, "< $::prefix$file" or return "";
+ my $filecontent = join("", <F>);
+ close F;
+ return $filecontent;
+}
+
+sub writesofficeconfigfile {
+ my ($file, $filecontent) = @_;
+ local *F;
+ open F, "> $::prefix$file" or return 0;
+ print F $filecontent;
+ close F;
+ return 1;
+}
+
diff --git a/perl-install/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 06f1119b9..57e57fe28 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -1,7 +1,7 @@
-package printerdrake;
+package printer::printerdrake;
# $Id$
-use diagnostics;
-use strict;
+
+
use common;
@@ -9,7 +9,10 @@ use detect_devices;
use modules;
use network;
use log;
-use printer;
+use printer::main;
+use printer::services;
+use printer::detect;
+use printer::default;
1;
@@ -20,7 +23,7 @@ sub choose_printer_type {
$printer->{str_type} = $printer::printer_type_inv{$printer->{TYPE}};
my $autodetect = 0;
$autodetect = 1 if $printer->{AUTODETECT};
- my @printertypes = printer::printer_type($printer);
+ my @printertypes = printer::main::printer_type($printer);
$in->ask_from_(
{ title => N("Select Printer Connection"),
messages => N("How is the printer connected?") .
@@ -63,13 +66,13 @@ sub config_cups {
# when "Apply" was at least pressed once.
my $retvalue = 0;
# Read CUPS config file
- my @cupsd_conf = printer::read_cupsd_conf();
+ my @cupsd_conf = printer::main::read_cupsd_conf();
foreach (@cupsd_conf) {
/^\s*BrowsePoll\s+(\S+)/ and $server = $1, last;
}
$server =~ /([^:]*):(.*)/ and ($server, $port) = ($1, $2);
#- Did we have automatic or manual configuration mode for CUPS
- $autoconf = printer::get_cups_autoconf();
+ $autoconf = printer::main::get_cups_autoconf();
#- Remember the server/port/autoconf settings to check whether the user
#- has changed them.
my $oldserver = $server;
@@ -123,11 +126,11 @@ Normally, CUPS is automatically configured according to your network environment
map { s/^\s*BrowsePoll\s+(\S+)/\#BrowsePoll $1/;
$_ } @cupsd_conf;
}
- printer::write_cupsd_conf(@cupsd_conf);
+ printer::main::write_cupsd_conf(@cupsd_conf);
}
# Set auto-configuration state
if ($autoconf != $oldautoconf) {
- printer::set_cups_autoconf($autoconf);
+ printer::main::set_cups_autoconf($autoconf);
}
# Save user settings for auto-install
$printer->{BROWSEPOLLADDR} = $server;
@@ -142,49 +145,28 @@ sub setup_printer_connection {
# Choose the appropriate connection config dialog
my $done = 1;
foreach ($printer->{TYPE}) {
- /LOCAL/ and setup_local_autoscan ($printer, $in, $upNetwork)
- and last;
- /LPD/ and setup_lpd ($printer, $in, $upNetwork) and last;
- /SOCKET/ and setup_socket ($printer, $in, $upNetwork) and last;
- /SMB/ and setup_smb ($printer, $in, $upNetwork) and last;
- /NCP/ and setup_ncp ($printer, $in, $upNetwork) and last;
- /URI/ and setup_uri ($printer, $in, $upNetwork) and last;
- /POSTPIPE/ and setup_postpipe ($printer, $in) and last;
+ /LOCAL/ and setup_local_autoscan ($printer, $in, $upNetwork) and last;
+ /LPD/ and setup_lpd ($printer, $in, $upNetwork) and last;
+ /SOCKET/ and setup_socket ($printer, $in, $upNetwork) and last;
+ /SMB/ and setup_smb ($printer, $in, $upNetwork) and last;
+ /NCP/ and setup_ncp ($printer, $in, $upNetwork) and last;
+ /URI/ and setup_uri ($printer, $in, $upNetwork) and last;
+ /POSTPIPE/ and setup_postpipe ($printer, $in) and last;
$done = 0; last;
}
return $done;
}
-sub local_detect {
- modules::get_probeall("usb-interface") and eval { modules::load("printer") };
- eval { modules::unload(qw(lp parport_pc parport_probe parport)) }; #- on kernel 2.4 parport has to be unloaded to probe again
- eval { modules::load(qw(parport_pc lp parport_probe)) }; #- take care as not available on 2.4 kernel (silent error).
- my $b = before_leaving { eval { modules::unload("parport_probe") } };
- detect_devices::whatPrinter();
-}
-
-sub net_detect {
- printer::whatNetPrinter(1, 0)
-}
-
-sub net_smb_detect {
- printer::whatNetPrinter(0, 1)
-}
-
-sub detect {
- local_detect(), net_detect(), net_smb_detect();
-}
-
sub first_time_dialog {
my ($printer, $in, $upNetwork) = @_;
- return 1 if printer::get_default_spooler () or $::isInstall;
+ return 1 if printer::default::get_spooler () or $::isInstall;
# Wait message
my $w = $in->wait_message(N("Printerdrake"),
N("Checking your system..."));
# Auto-detect local printers
- my @autodetected = local_detect();
+ my @autodetected = printer::detect::local_detect();
my @printerlist;
my $localprinterspresent;
if (@autodetected == ()) {
@@ -233,7 +215,7 @@ sub first_time_dialog {
# configure networking.
my $havelocalnetworks =
(check_network($printer, $in, $upNetwork, 1) &&
- (printer::getIPsInLocalNetworks() != ()));
+ (printer::detect::getIPsInLocalNetworks() != ()));
# Finish building the dialog text
my $question = ($havelocalnetworks ?
@@ -268,7 +250,7 @@ sub wizard_welcome {
undef $printer->{AUTODETECTSMB};
} else {
$havelocalnetworks = ((check_network($printer, $in, $upNetwork, 1)) &&
- (printer::getIPsInLocalNetworks() != ()));
+ (printer::detect::getIPsInLocalNetworks() != ()));
if (!$havelocalnetworks) {
undef $printer->{AUTODETECTNETWORK};
undef $printer->{AUTODETECTSMB};
@@ -340,21 +322,9 @@ If you have printer(s) connected to this machine, Please plug it/them in on this
{ text => N("Auto-detect printers connected to machines running Microsoft Windows"), type => 'bool',
val => \$autodetectsmb } : ())) : ())
]);
- if ($autodetectlocal) {
- $printer->{AUTODETECTLOCAL} = 1;
- } else {
- undef $printer->{AUTODETECTLOCAL};
- }
- if ($autodetectnetwork) {
- $printer->{AUTODETECTNETWORK} = 1;
- } else {
- undef $printer->{AUTODETECTNETWORK};
- }
- if ($autodetectsmb && ($printer->{SPOOLER} ne "pdq")) {
- $printer->{AUTODETECTSMB} = 1;
- } else {
- undef $printer->{AUTODETECTSMB};
- }
+ $printer->{AUTODETECTLOCAL} = $autodetectlocal ? 1 : undef;
+ $printer->{AUTODETECTNETWORK} = $autodetectnetwork ? 1 : undef;
+ $printer->{AUTODETECTSMB} = ($autodetectsmb && ($printer->{SPOOLER} ne "pdq")) ? 1 : undef;
}
};
return ($@ =~ /wizcancel/) ? 0 : $ret;
@@ -390,7 +360,7 @@ sub setup_local_autoscan {
# If the user requested auto-detection of remote printers, check
# whether the network functionality is configured and running
if ($printer->{AUTODETECTNETWORK} || $printer->{AUTODETECTSMB}) {
- if (!check_network($printer, $in, $upNetwork, 0)) { return 0 };
+ return 0 unless check_network($printer, $in, $upNetwork, 0);
}
my @autodetected;
@@ -399,17 +369,18 @@ sub setup_local_autoscan {
if ($do_auto_detect) {
if ((!$::testing) &&
(!$expert_or_modify) && ($printer->{AUTODETECTSMB}) &&
- (!printer::files_exist((qw(/usr/bin/smbclient))))) {
+ (!files_exist((qw(/usr/bin/smbclient))))) {
$in->do_pkgs->install('samba-client');
}
my $w = $in->wait_message(N("Printer auto-detection"), N("Detecting devices..."));
# When HPOJ is running, it blocks the printer ports on which it is
# configured, so we stop it here. If it is not installed or not
# configured, this command has no effect.
- printer::stop_service("hpoj");
- @autodetected = ($expert_or_modify || $printer->{AUTODETECTLOCAL}) and local_detect,
- (!$expert_or_modify && $printer->{AUTODETECTNETWORK}) and net_detect,
- (!$expert_or_modify && $printer->{AUTODETECTSMB}) and net_smb_detect;
+ require services;
+ services::stop("hpoj");
+ @autodetected = ($expert_or_modify || $printer->{AUTODETECTLOCAL}) and printer::detect::local_detect(),
+ (!$expert_or_modify && $printer->{AUTODETECTNETWORK}) and printer::detect::net_detect(),
+ (!$expert_or_modify && $printer->{AUTODETECTSMB}) and printer::detect::net_smb_detect();
# We have more than one printer, so we must ask the user for a queue
# name in the fully automatic printer configuration.
$printer->{MORETHANONE} = ($#autodetected > 0);
@@ -476,7 +447,7 @@ sub setup_local_autoscan {
}
# We are ready with auto-detection, so we restart HPOJ here. If it
# is not installed or not configured, this command has no effect.
- printer::start_service("hpoj");
+ printer::services::start("hpoj");
} else {
# Always ask for queue name in recommended mode when no auto-
# detection was done
@@ -557,15 +528,11 @@ sub setup_local_autoscan {
last;
}
}
- } else {
- $device = "";
- }
+ } else { $device = "" }
if (($menuchoice eq "") && (@menuentrieslist > -1)) {
$menuchoice = $menuentrieslist[0];
$oldmenuchoice = $menuchoice;
- if ($device eq "") {
- $device = $menuentries->{$menuchoice};
- }
+ $device = $menuentries->{$menuchoice} if $device eq "";
}
if ($in) {
$::expert or $in->set_help('configurePrinterDev') if $::isInstall;
@@ -660,7 +627,7 @@ sub setup_local_autoscan {
#- LPD and LPRng need netcat ('nc') to access to socket printers
if ((($printer->{SPOOLER} eq 'lpd') || ($printer->{SPOOLER} eq 'lprng')) &&
(!$::testing) && ($device =~ /^socket:/) &&
- (!printer::files_exist((qw(/usr/bin/nc))))) {
+ (!files_exist((qw(/usr/bin/nc))))) {
$in->do_pkgs->install('nc');
}
@@ -716,13 +683,13 @@ complete => sub {
#- LPD does not support filtered queues to a remote LPD server by itself
#- It needs an additional program as "rlpr"
if (($printer->{SPOOLER} eq 'lpd') && (!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/rlpr))))) {
+ (!files_exist((qw(/usr/bin/rlpr))))) {
$in->do_pkgs->install('rlpr');
}
# Auto-detect printer model (works if host is an ethernet-connected
# printer)
- my $modelinfo = printer::getSNMPModel ($remotehost);
+ my $modelinfo = printer::detect::getSNMPModel ($remotehost);
my $auto_hpoj;
if ((defined($modelinfo)) &&
($modelinfo->{MANUFACTURER} ne "") &&
@@ -740,7 +707,7 @@ complete => sub {
"$modelinfo->{MANUFACTURER} $modelinfo->{MODEL}",
$printer->{currentqueue}{connect}, $auto_hpoj,
({port => $printer->{currentqueue}{connect},
- val => $modelinfo }));
+ val => $modelinfo}));
1;
}
@@ -802,11 +769,11 @@ sub setup_smb {
if ($printer->{AUTODETECT}) {
$autodetect = 1;
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/smbclient))))) {
+ (!files_exist((qw(/usr/bin/smbclient))))) {
$in->do_pkgs->install('samba-client');
}
my $w = $in->wait_message(N("Printer auto-detection"), N("Scanning network..."));
- @autodetected = net_smb_detect();
+ @autodetected = printer::detect::net_smb_detect();
foreach my $p (@autodetected) {
my $menustr;
$p->{port} =~ m!^smb://([^/:]+)/([^/:]+)$!;
@@ -872,7 +839,7 @@ sub setup_smb {
val => \$menuchoice, list => \@menuentrieslist,
not_edit => 1, format => \&translate, sort => 0,
allow_empty_list => 1, type => 'combo' } :
- ()) ],
+ ()) ],
complete => sub {
if (!network::is_ip($smbserverip) && $smbserverip ne "") {
$in->ask_warn('', N("IP address should be in format 1.2.3.4"));
@@ -930,10 +897,10 @@ Do you really want to continue setting up this printer as you are doing now?"),
($smbserver || $smbserverip), "/$smbshare");
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/smbclient))))) {
+ (!files_exist((qw(/usr/bin/smbclient))))) {
$in->do_pkgs->install('samba-client');
}
- $printer->{SPOOLER} eq 'cups' and printer::restart_queue($printer);
+ $printer->{SPOOLER} eq 'cups' and printer::main::restart_queue($printer);
1;
}
@@ -1000,7 +967,7 @@ complete => sub {
"$ncpserver/$ncpqueue");
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/nprint))))) {
+ (!files_exist((qw(/usr/bin/nprint))))) {
$in->do_pkgs->install('ncpfs');
}
@@ -1046,7 +1013,7 @@ sub setup_socket {
if ($printer->{AUTODETECT}) {
$autodetect = 1;
my $w = $in->wait_message(N("Printer auto-detection"), N("Scanning network..."));
- @autodetected = net_detect();
+ @autodetected = printer::detect::net_detect();
foreach my $p (@autodetected) {
my $menustr;
$p->{port} =~ m!^socket://([^:]+):(\d+)$!;
@@ -1134,7 +1101,7 @@ sub setup_socket {
{ val => \$menuchoice, list => \@menuentrieslist,
not_edit => 0, format => \&translate, sort => 0,
allow_empty_list => 1, type => 'list' } :
- ())
+ ())
]
);
@@ -1145,14 +1112,14 @@ sub setup_socket {
#- LPD and LPRng need netcat ('nc') to access to socket printers
if ((($printer->{SPOOLER} eq 'lpd') || ($printer->{SPOOLER} eq 'lprng'))&&
(!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/nc))))) {
+ (!files_exist((qw(/usr/bin/nc))))) {
$in->do_pkgs->install('nc');
}
# Auto-detect printer model
my $modelinfo;
if ($printer->{AUTODETECT}) {
- $modelinfo = printer::getSNMPModel ($remotehost);
+ $modelinfo = printer::detect::getSNMPModel ($remotehost);
}
my $auto_hpoj;
if ((defined($modelinfo)) &&
@@ -1210,24 +1177,24 @@ complete => sub {
# It needs an additional program as "rlpr"
if (($printer->{currentqueue}{connect} =~ /^lpd:/) &&
($printer->{SPOOLER} eq 'lpd') && (!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/rlpr))))) {
+ (!files_exist((qw(/usr/bin/rlpr))))) {
$in->do_pkgs->install('rlpr');
}
if (($printer->{currentqueue}{connect} =~ /^smb:/) &&
(!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/smbclient))))) {
+ (!files_exist((qw(/usr/bin/smbclient))))) {
$in->do_pkgs->install('samba-client');
}
if (($printer->{currentqueue}{connect} =~ /^ncp:/) &&
(!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/nprint))))) {
+ (!files_exist((qw(/usr/bin/nprint))))) {
$in->do_pkgs->install('ncpfs');
}
#- LPD and LPRng need netcat ('nc') to access to socket printers
if (($printer->{currentqueue}{connect} =~ /^socket:/) &&
(($printer->{SPOOLER} eq 'lpd') || ($printer->{SPOOLER} eq 'lprng')) &&
(!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/nc))))) {
+ (!files_exist((qw(/usr/bin/nc))))) {
$in->do_pkgs->install('nc');
}
@@ -1239,7 +1206,7 @@ complete => sub {
# Auto-detect printer model (works if host is an ethernet-connected
# printer)
my $remotehost = $1;
- my $modelinfo = printer::getSNMPModel ($remotehost);
+ my $modelinfo = printer::main::getSNMPModel ($remotehost);
my $auto_hpoj;
if ((defined($modelinfo)) &&
($modelinfo->{MANUFACTURER} ne "") &&
@@ -1325,7 +1292,7 @@ sub setup_common {
($isHPOJ)) {
# Install HPOJ package
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/sbin/ptal-mlcd
+ (!files_exist((qw(/usr/sbin/ptal-mlcd
/usr/sbin/ptal-init
/usr/bin/xojpanel))))) {
my $w = $in->wait_message(N("Printerdrake"),
@@ -1336,7 +1303,7 @@ sub setup_common {
my $w = $in->wait_message
(N("Printerdrake"),
N("Checking device and configuring HPOJ..."));
- $ptaldevice = printer::configure_hpoj($device, @autodetected);
+ $ptaldevice = printer::main::configure_hpoj($device, @autodetected);
if ($ptaldevice) {
# Configure scanning with SANE on the MF device
@@ -1344,12 +1311,12 @@ sub setup_common {
($makemodel !~ /HP\s+LaserJet\s+2200/i)) {
# Install SANE
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/scanimage
+ (!files_exist((qw(/usr/bin/scanimage
/usr/bin/xscanimage
/usr/bin/xsane
/etc/sane.d/dll.conf
/usr/lib/libsane-hpoj.so.1),
- (printer::files_exist
+ (files_exist
('/usr/bin/gimp') ?
'/usr/bin/xsane-gimp' :
()))))) {
@@ -1363,7 +1330,7 @@ sub setup_common {
('gimp'),'xsane-gimp'));
}
# Configure the HPOJ SANE backend
- printer::config_sane();
+ printer::main::config_sane();
}
# Configure photo card access with mtools and MToolsFM
if ((($makemodel =~ /HP\s+PhotoSmart/i) ||
@@ -1373,7 +1340,7 @@ sub setup_common {
($makemodel !~ /HP\s+PhotoSmart\s+7150/i)) {
# Install mtools and MToolsFM
if ((!$::testing) &&
- (!printer::files_exist(qw(/usr/bin/mdir
+ (!files_exist(qw(/usr/bin/mdir
/usr/bin/mcopy
/usr/bin/MToolsFM
)))) {
@@ -1383,7 +1350,7 @@ sub setup_common {
$in->do_pkgs->install('mtools', 'mtoolsfm');
}
# Configure mtools/MToolsFM for photo card access
- printer::config_photocard();
+ printer::main::config_photocard();
}
my $text = "";
@@ -1429,14 +1396,14 @@ sub setup_common {
($device !~ /^http:/) &&
($device !~ /^ipp:/)) {
my $w = $in->wait_message(N("Printerdrake"), N("Making printer port available for CUPS..."));
- printer::assure_device_is_available_for_cups($ptaldevice || $device);
+ printer::main::assure_device_is_available_for_cups($ptaldevice || $device);
}
#- Read the printer driver database if necessary
- if ((keys %printer::thedb) == 0) {
+ if ((keys %printer::main::thedb) == 0) {
my $w = $in->wait_message(N("Printerdrake"),
N("Reading printer database..."));
- printer::read_printer_db($printer->{SPOOLER});
+ printer::main::read_printer_db($printer->{SPOOLER});
}
#- Search the database entry which matches the detected printer best
@@ -1467,7 +1434,7 @@ sub setup_common {
# If there is more than one matching database entry, the longest match
# counts.
my $matchlength = 0;
- foreach my $entry (keys %printer::thedb) {
+ foreach my $entry (keys %printer::main::thedb) {
my $dbmakemodel;
if ($::expert) {
$entry =~ m/^(.*)\|[^\|]*$/;
@@ -1494,7 +1461,7 @@ sub setup_common {
}
if (!$printer->{DBENTRY}) {
$printer->{DBENTRY} =
- bestMatchSentence ($descr, keys %printer::thedb);
+ bestMatchSentence ($descr, keys %printer::main::thedb);
}
# If the manufacturer was not guessed correctly, discard the
# guess.
@@ -1559,10 +1526,10 @@ N("Every printer needs a name (for example \"printer\"). The Description and Loc
sub get_db_entry {
my ($printer, $in) = @_;
#- Read the printer driver database if necessary
- if ((keys %printer::thedb) == 0) {
+ if ((keys %printer::main::thedb) == 0) {
my $w = $in->wait_message(N("Printerdrake"),
N("Reading printer database..."));
- printer::read_printer_db($printer->{SPOOLER});
+ printer::main::read_printer_db($printer->{SPOOLER});
}
my $w = $in->wait_message(N("Printerdrake"),
N("Preparing printer database..."));
@@ -1583,7 +1550,7 @@ sub get_db_entry {
$printer->{DBENTRY} = "$make|$model|$driverstr";
# database key contains the "(recommended)" for the
# recommended driver, so add it if necessary
- if (!member($printer->{DBENTRY}, keys(%printer::thedb))) {
+ if (!member($printer->{DBENTRY}, keys(%printer::main::thedb))) {
$printer->{DBENTRY} .= " (recommended)";
}
} else {
@@ -1593,7 +1560,7 @@ sub get_db_entry {
} elsif (($printer->{SPOOLER} eq "cups") && ($::expert) &&
($printer->{configured}{$queue}{queuedata}{ppd})) {
# Do we have a native CUPS driver or a PostScript PPD file?
- $printer->{DBENTRY} = printer::get_descr_from_ppd($printer) || $printer->{DBENTRY};
+ $printer->{DBENTRY} = printer::main::get_descr_from_ppd($printer) || $printer->{DBENTRY};
$printer->{OLD_CHOICE} = $printer->{DBENTRY};
} else {
# Point the list cursor at least to manufacturer and model of the
@@ -1601,7 +1568,7 @@ sub get_db_entry {
$printer->{DBENTRY} = "";
my $make = uc($printer->{configured}{$queue}{queuedata}{make});
my $model = $printer->{configured}{$queue}{queuedata}{model};
- foreach my $key (keys %printer::thedb) {
+ foreach my $key (keys %printer::main::thedb) {
if ((($::expert) && ($key =~ /^$make\|$model\|.*\(recommended\)$/)) ||
((!$::expert) && ($key =~ /^$make\|$model$/))) {
$printer->{DBENTRY} = $key;
@@ -1613,7 +1580,7 @@ sub get_db_entry {
$model =~ s/PS//;
$model =~ s/PostScript//;
$model =~ s/Series//;
- foreach my $key (keys %printer::thedb) {
+ for $key (keys %printer::main::thedb) {
if ((($::expert) && ($key =~ /^$make\|$model\|.*\(recommended\)$/)) ||
((!$::expert) && ($key =~ /^$make\|$model$/))) {
$printer->{DBENTRY} = $key;
@@ -1623,7 +1590,7 @@ sub get_db_entry {
if (($printer->{DBENTRY} eq "") && ($make ne "")) {
# Exact match with cleaned-up model did not work, try a best match
my $matchstr = "$make|$model";
- $printer->{DBENTRY} = bestMatchSentence($matchstr, keys %printer::thedb);
+ $printer->{DBENTRY} = bestMatchSentence($matchstr, keys %printer::main::thedb);
# If the manufacturer was not guessed correctly, discard the
# guess.
$printer->{DBENTRY} =~ /^([^\|]+)\|/;
@@ -1639,7 +1606,7 @@ sub get_db_entry {
} else {
if (($::expert) && ($printer->{DBENTRY} !~ /(recommended)/)) {
my ($make, $model) = $printer->{DBENTRY} =~ /^([^\|]+)\|([^\|]+)\|/;
- foreach my $key (keys %printer::thedb) {
+ foreach my $key (keys %printer::main::thedb) {
if ($key =~ /^$make\|$model\|.*\(recommended\)$/) {
$printer->{DBENTRY} = $key;
}
@@ -1680,12 +1647,12 @@ sub choose_model {
my ($printer, $in) = @_;
$in->set_help('chooseModel') if $::isInstall;
#- Read the printer driver database if necessary
- if ((keys %printer::thedb) == 0) {
+ if ((keys %printer::main::thedb) == 0) {
my $w = $in->wait_message(N("Printerdrake"),
N("Reading printer database..."));
- printer::read_printer_db($printer->{SPOOLER});
+ printer::main::read_printer_db($printer->{SPOOLER});
}
- if (!member($printer->{DBENTRY}, keys(%printer::thedb))) {
+ if (!member($printer->{DBENTRY}, keys(%printer::main::thedb))) {
$printer->{DBENTRY} = N("Raw printer (No driver)");
}
# Choose the printer/driver from the list
@@ -1695,17 +1662,17 @@ sub choose_model {
Please check whether Printerdrake did the auto-detection of your printer model correctly. Search the correct model in the list when the cursor is standing on a wrong model or on \"Raw printer\".") . " " .
N("If your printer is not listed, choose a compatible (see printer manual) or a similar one."), '|',
- [ keys %printer::thedb ], $printer->{DBENTRY}));
+ [ keys %printer::main::thedb ], $printer->{DBENTRY}));
}
sub get_printer_info {
my ($printer, $in) = @_;
#- Read the printer driver database if necessary
- #if ((keys %printer::thedb) == 0) {
+ #if ((keys %printer::main::thedb) == 0) {
# my $w = $in->wait_message(N("Printerdrake"),
# N("Reading printer database..."));
- # printer::read_printer_db($printer->{SPOOLER});
+ # printer::main::read_printer_db($printer->{SPOOLER});
#}
my $queue = $printer->{OLD_QUEUE};
my $oldchoice = $printer->{OLD_CHOICE};
@@ -1714,13 +1681,13 @@ sub get_printer_info {
(($oldchoice) && ($printer->{DBENTRY}) && # make/model/driver changed
(($oldchoice ne $printer->{DBENTRY}) ||
($printer->{currentqueue}{driver} ne
- $printer::thedb{$printer->{DBENTRY}}{driver})))) {
+ $printer::main::thedb{$printer->{DBENTRY}}{driver})))) {
delete($printer->{currentqueue}{printer});
delete($printer->{currentqueue}{ppd});
$printer->{currentqueue}{foomatic} = 0;
# Read info from printer database
foreach (qw(printer ppd driver make model)) { #- copy some parameter, shorter that way...
- $printer->{currentqueue}{$_} = $printer::thedb{$printer->{DBENTRY}}{$_};
+ $printer->{currentqueue}{$_} = $printer::main::thedb{$printer->{DBENTRY}}{$_};
}
$newdriver = 1;
}
@@ -1739,7 +1706,7 @@ sub get_printer_info {
$printer->{ARGS} = $printer->{configured}{$queue}{args};
} else {
# ... and the user has chosen another printer/driver
- $printer->{ARGS} = printer::read_foomatic_options($printer);
+ $printer->{ARGS} = printer::main::read_foomatic_options($printer);
}
} else {
# The queue was not configured with Foomatic before
@@ -1776,16 +1743,16 @@ sub get_printer_info {
}
$printer->{currentqueue}{connect} = 'file:/dev/null';
# Start the oki4daemon
- printer::start_service_on_boot('oki4daemon');
- printer::start_service('oki4daemon');
+ services::start_service_on_boot('oki4daemon');
+ printer::services::start('oki4daemon');
# Set permissions
if ($printer->{SPOOLER} eq 'cups') {
- printer::set_permissions('/dev/oki4drv', '660', 'lp',
+ set_permissions('/dev/oki4drv', '660', 'lp',
'sys');
} elsif ($printer->{SPOOLER} eq 'pdq') {
- printer::set_permissions('/dev/oki4drv', '666');
+ set_permissions('/dev/oki4drv', '666');
} else {
- printer::set_permissions('/dev/oki4drv', '660', 'lp',
+ set_permissions('/dev/oki4drv', '660', 'lp',
'lp');
}
} elsif ($printer->{currentqueue}{driver} eq 'lexmarkinkjet') {
@@ -1822,11 +1789,11 @@ sub get_printer_info {
# Set device permissions
$printer->{currentqueue}{connect} =~ /^\s*file:(\S*)\s*$/;
if ($printer->{SPOOLER} eq 'cups') {
- printer::set_permissions($1, '660', 'lp', 'sys');
+ set_permissions($1, '660', 'lp', 'sys');
} elsif ($printer->{SPOOLER} eq 'pdq') {
- printer::set_permissions($1, '666');
+ set_permissions($1, '666');
} else {
- printer::set_permissions($1, '660', 'lp', 'lp');
+ set_permissions($1, '660', 'lp', 'lp');
}
# This is needed to have the device not blocked by the
# spooler backend.
@@ -1836,10 +1803,10 @@ sub get_printer_info {
if ($drivertype eq 'Z22') { $drivertype = 'Z32' }
if ($drivertype eq 'Z23') { $drivertype = 'Z33' }
$drivertype = lc($drivertype);
- if (!printer::files_exist("/usr/local/lexmark/$drivertype/$drivertype")) {
+ if (!files_exist("/usr/local/lexmark/$drivertype/$drivertype")) {
eval { $in->do_pkgs->install("lexmark-drivers-$drivertype") };
}
- if (!printer::files_exist("/usr/local/lexmark/$drivertype/$drivertype")) {
+ if (!files_exist("/usr/local/lexmark/$drivertype/$drivertype")) {
# Driver installation failed, probably we do not have
# the commercial CDs
$in->ask_warn(N("Lexmark inkjet configuration"),
@@ -1857,7 +1824,7 @@ Some of these printers, as the HP LaserJet 1000, for which this driver was origi
The first command can be given by any normal user, the second must be given as root. After having done so you can print normally.
"));
}
- $printer->{ARGS} = printer::read_foomatic_options($printer);
+ $printer->{ARGS} = printer::main::read_foomatic_options($printer);
delete($printer->{SPECIAL_OPTIONS});
}
} elsif ($printer->{currentqueue}{ppd}) { # CUPS+PPD queue?
@@ -1872,14 +1839,14 @@ The first command can be given by any normal user, the second must be given as r
if ((!$printer->{DBENTRY}) || (!$oldchoice) ||
($printer->{DBENTRY} eq $oldchoice)) {
# ... and the user didn't change the printer/driver
- $printer->{ARGS} = printer::read_cups_options($queue);
+ $printer->{ARGS} = printer::main::read_cups_options($queue);
} else {
# ... and the user has chosen another printer/driver
- $printer->{ARGS} = printer::read_cups_options("/usr/share/cups/model/$printer->{currentqueue}{ppd}");
+ $printer->{ARGS} = printer::main::read_cups_options("/usr/share/cups/model/$printer->{currentqueue}{ppd}");
}
} else {
# The queue was not configured before
- $printer->{ARGS} = printer::read_cups_options("/usr/share/cups/model/$printer->{currentqueue}{ppd}");
+ $printer->{ARGS} = printer::main::read_cups_options("/usr/share/cups/model/$printer->{currentqueue}{ppd}");
}
}
}
@@ -2050,7 +2017,7 @@ sub setup_options {
$printer->{DBENTRY} =~ /^[^\|]*\|[^\|]*\|(.*)$/;
$driver = $1;
} else {
- $driver = printer::get_descr_from_ppd($printer);
+ $driver = printer::main::get_descr_from_ppd($printer);
if ($driver =~ /^[^\|]*\|[^\|]*$/) { # No driver info
$driver = "CUPS/PPD";
} else {
@@ -2092,7 +2059,7 @@ You should make sure that the page size and the ink type/printing mode (if avail
}
}
return (0);
- });
+ } );
}
# Read out the user's choices and generate the appropriate command
# line arguments
@@ -2127,7 +2094,7 @@ sub setasdefault {
# so set the current one as default
($in->ask_yesorno('', N("Do you want to set this printer (\"%s\")\nas the default printer?", $printer->{QUEUE}), 0))) { # Ask the user
$printer->{DEFAULT} = $printer->{QUEUE};
- printer::set_default_printer($printer);
+ printer::default::set_printer($printer);
}
}
@@ -2226,7 +2193,7 @@ Note: the photo test page can take a rather long time to get printed and on lase
{ text => N("Do not print any test page"), type => 'bool',
val => \$res2 } : ())
]);
- $res2 = 1 if !($standard || $altletter || $alta4 || $photo || $ascii);
+ $res2 = 1 unless $standard || $altletter || $alta4 || $photo || $ascii;
if ($res1 && !$res2) {
my @lpq_output;
{
@@ -2242,7 +2209,7 @@ Note: the photo test page can take a rather long time to get printed and on lase
my @testpages;
# Install the filter to convert the photo test page to PS
if (($printer->{SPOOLER} ne "cups") && ($photo) && (!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/convert))))) {
+ (!files_exist((qw(/usr/bin/convert))))) {
$in->do_pkgs->install('ImageMagick');
}
# set up list of pages to print
@@ -2252,7 +2219,7 @@ Note: the photo test page can take a rather long time to get printed and on lase
$photo && push (@testpages, $phototestpage);
$ascii && push (@testpages, $asciitestpage);
# print the stuff
- @lpq_output = printer::print_pages($printer, @testpages);
+ @lpq_output = printer::main::print_pages($printer, @testpages);
}
my $dialogtext;
if (@lpq_output) {
@@ -2325,11 +2292,11 @@ The \"%s\" command also allows to modify the option settings for a particular pr
(!$cupsremote ?
N("To know about the options available for the current printer read either the list shown below or click on the \"Print option list\" button.%s%s
-", $scanning, $photocard) . printer::help_output($printer, 'lpd') :
+", $scanning, $photocard) . printer::main::help_output($printer, 'lpd') :
$scanning . $photocard .
N("Here is a list of the available printing options for the current printer:
-") . printer::help_output($printer, 'lpd')) : $scanning . $photocard);
+") . printer::main::help_output($printer, 'lpd')) : $scanning . $photocard);
} elsif ($spooler eq "lprng") {
$dialogtext =
N("To print a file from the command line (terminal window) use the command \"%s <file>\".
@@ -2365,7 +2332,7 @@ The \"%s\" and \"%s\" commands also allow to modify the option settings for a pa
", "pdq", "lpr", ($queue ne $default ? "pdq -P $queue -aoption=setting -oswitch" : "pdq -aoption=setting -oswitch")) .
N("To know about the options available for the current printer read either the list shown below or click on the \"Print option list\" button.%s%s
-", $scanning, $photocard) . printer::help_output($printer, 'pdq') :
+", $scanning, $photocard) . printer::main::help_output($printer, 'pdq') :
$scanning . $photocard);
}
my $windowtitle = ($scanning ?
@@ -2385,7 +2352,7 @@ N("To know about the options available for the current printer read either the l
if ($choice ne N("Close")) {
my $w = $in->wait_message(N("Printerdrake"),
N("Printing test page(s)..."));
- printer::print_optionlist($printer);
+ printer::main::print_optionlist($printer);
}
}
} else {
@@ -2444,14 +2411,14 @@ sub copy_queues_from {
{
my $w = $in->wait_message(N("Printerdrake"),
N("Reading printer data..."));
- @oldqueues = printer::get_copiable_queues($oldspooler, $newspooler);
+ @oldqueues = printer::main::get_copiable_queues($oldspooler, $newspooler);
@oldqueues = sort(@oldqueues);
$newspoolerstr = $printer::shortspooler_inv{$newspooler};
$oldspoolerstr = $printer::shortspooler_inv{$oldspooler};
foreach (@oldqueues) {
push (@queuesselected, 1);
push (@queueentries, { text => $_, type => 'bool',
- val => \$queuesselected[$#queuesselected] });
+ val => \$queuesselected[$#queuesselected] } );
}
# LPRng and LPD use the same config files, therefore one sees the
# queues of LPD when one uses LPRng and vice versa, but these queues
@@ -2517,7 +2484,7 @@ You can also type a new name or skip this printer.",
{
my $w = $in->wait_message(N("Printerdrake"),
N("Transferring %s...", $oldqueue));
- printer::copy_foomatic_queue($printer, $oldqueue,
+ printer::main::copy_foomatic_queue($printer, $oldqueue,
$oldspooler, $newqueue) and
$queuecopied = 1;
}
@@ -2529,7 +2496,7 @@ You can also type a new name or skip this printer.",
(N("Transfer printer configuration"),
N("You have transferred your former default printer (\"%s\"), Should it be also the default printer under the new printing system %s?", $oldqueue, $newspoolerstr), 1))) {
$printer->{DEFAULT} = $newqueue;
- printer::set_default_printer($printer);
+ printer::default::set_printer($printer);
}
}
}
@@ -2538,7 +2505,7 @@ You can also type a new name or skip this printer.",
if ($queuecopied) {
my $w = $in->wait_message(N("Printerdrake"),
N("Refreshing printer data..."));
- printer::read_configured_queues($printer);
+ printer::main::read_configured_queues($printer);
}
}
}
@@ -2553,9 +2520,7 @@ sub start_network {
undef $upNetwork;
sleep(1);
$ret });
- } else {
- return printer::start_service("network");
- }
+ } else { return printer::services::start("network") }
}
sub check_network {
@@ -2577,7 +2542,7 @@ sub check_network {
# (otherwise the network is not configured yet and drakconnect has to be
# started)
- if ((!printer::files_exist("/etc/sysconfig/network-scripts/drakconnect_conf")) &&
+ if ((!files_exist("/etc/sysconfig/network-scripts/drakconnect_conf")) &&
(!$dontconfigure)) {
my $go_on = 0;
while (!$go_on) {
@@ -2599,7 +2564,7 @@ sub check_network {
} else {
system("/usr/sbin/drakconnect");
}
- if (printer::files_exist("/etc/sysconfig/network-scripts/drakconnect_conf")) {
+ if (files_exist("/etc/sysconfig/network-scripts/drakconnect_conf")) {
$go_on = 1;
}
} else {
@@ -2612,11 +2577,11 @@ sub check_network {
}
# Do not try to start the network if it is not configured
- if (!printer::files_exist("/etc/sysconfig/network-scripts/drakconnect_conf")) { return 0 }
+ if (!files_exist("/etc/sysconfig/network-scripts/drakconnect_conf")) { return 0 }
# Second check: Is the network running?
- if (printer::network_running()) { return 1 }
+ if (printer::detect::network_running()) { return 1 }
# The network is configured now, start it.
if ((!start_network($in, $upNetwork)) && (!$dontconfigure)) {
@@ -2635,7 +2600,7 @@ N("The network access was not running and could not be started. Please check you
my $w = $in->wait_message(N("Configuration of a remote printer"),
N("Restarting printing system..."));
- return printer::SIGHUP_daemon($printer->{SPOOLER});
+ return printer::main::SIGHUP_daemon($printer->{SPOOLER});
}
@@ -2667,7 +2632,7 @@ sub security_check {
# Exit silently if the current spooler is already activated for the current
# security level
- if (printer::spooler_in_security_level($spooler, $security)) { return 1 }
+ if (printer::main::spooler_in_security_level($spooler, $security)) { return 1 }
# Tell user in which security mode he is and ask him whether he really
# wants to activate the spooler in the given security mode. Stop the
@@ -2679,16 +2644,16 @@ sub security_check {
This printing system runs a daemon (background process) which waits for print jobs and handles them. This daemon is also accessable by remote machines through the network and so it is a possible point for attacks. Therefore only a few selected daemons are started by default in this security level.
Do you really want to configure printing on this machine?",
- $printer::shortspooler_inv{$spooler},
+ $printer::main::shortspooler_inv{$spooler},
$securitystr))) {
- printer::add_spooler_to_security_level($spooler, $security);
+ printer::main::add_spooler_to_security_level($spooler, $security);
my $service;
if (($spooler eq "lpr") || ($spooler eq "lprng")) {
$service = "lpd";
} else {
$service = $spooler;
}
- printer::start_service_on_boot($service);
+ services::start_service_on_boot($service); #TV
return 1;
} else {
return 0;
@@ -2705,15 +2670,15 @@ sub start_spooler_on_boot {
local $::isWizard = 0;
$in->set_help('startSpoolerOnBoot') if $::isInstall;
- if (!printer::service_starts_on_boot($service)) {
+ if (!services::starts_on_boot($service)) {
if ($in->ask_yesorno(N("Starting the printing system at boot time"),
N("The printing system (%s) will not be started automatically when the machine is booted.
It is possible that the automatic starting was turned off by changing to a higher security level, because the printing system is a potential point for attacks.
Do you want to have the automatic starting of the printing system turned on again?",
- $printer::shortspooler_inv{$printer->{SPOOLER}}))) {
- printer::start_service_on_boot($service);
+ $printer::main::shortspooler_inv{$printer->{SPOOLER}}))) {
+ services::start_service_on_boot($service);
}
}
1;
@@ -2725,15 +2690,13 @@ sub install_spooler {
if (!$::testing) {
# If the user refuses to install the spooler in high or paranoid
# security level, exit.
- if (!security_check($printer, $in, $printer->{SPOOLER})) {
- return 0;
- }
+ return 0 unless security_check($printer, $in, $printer->{SPOOLER});
if ($printer->{SPOOLER} eq "cups") {
{
my $w = $in->wait_message(N("Printerdrake"),
N("Checking installed software..."));
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/lib/cups/cgi-bin/printers.cgi
+ (!files_exist((qw(/usr/lib/cups/cgi-bin/printers.cgi
/sbin/ifconfig
/usr/bin/xpp),
($::expert ?
@@ -2743,8 +2706,8 @@ sub install_spooler {
($::expert ? 'cups-drivers' : ())));
}
if ((!$::testing) &&
- ((!printer::files_exist((qw(/usr/bin/wget)))) &&
- (!printer::files_exist((qw(/usr/bin/curl)))))) {
+ ((!files_exist((qw(/usr/bin/wget)))) &&
+ (!files_exist((qw(/usr/bin/curl)))))) {
$in->do_pkgs->install
($::isInstall ? 'curl' : 'webfetch');
}
@@ -2759,17 +2722,17 @@ sub install_spooler {
# Start daemon
# Avoid unnecessary restarting of CUPS, this blocks the
# startup of printerdrake for several seconds.
- printer::start_not_running_service("cups");
+ printer::services::start_not_running_service("cups");
# Set the CUPS tools as defaults for "lpr", "lpq", "lprm", ...
- printer::set_alternative("lpr","/usr/bin/lpr-cups");
- printer::set_alternative("lpq","/usr/bin/lpq-cups");
- printer::set_alternative("lprm","/usr/bin/lprm-cups");
- printer::set_alternative("lp","/usr/bin/lp-cups");
- printer::set_alternative("cancel","/usr/bin/cancel-cups");
- printer::set_alternative("lpstat","/usr/bin/lpstat-cups");
- printer::set_alternative("lpc","/usr/sbin/lpc-cups");
+ set_alternative("lpr","/usr/bin/lpr-cups");
+ set_alternative("lpq","/usr/bin/lpq-cups");
+ set_alternative("lprm","/usr/bin/lprm-cups");
+ set_alternative("lp","/usr/bin/lp-cups");
+ set_alternative("cancel","/usr/bin/cancel-cups");
+ set_alternative("lpstat","/usr/bin/lpstat-cups");
+ set_alternative("lpc","/usr/sbin/lpc-cups");
# Remove PDQ panic buttons from the user's KDE Desktops
- printer::pdq_panic_button("remove");
+ printer::main::pdq_panic_button("remove");
}
# Should it be started at boot time?
start_spooler_on_boot($printer, $in, "cups");
@@ -2779,13 +2742,13 @@ sub install_spooler {
N("Checking installed software..."));
# "lpr" conflicts with "LPRng", remove "LPRng"
if ((!$::testing) &&
- (printer::files_exist((qw(/usr/lib/filters/lpf))))) {
+ (files_exist((qw(/usr/lib/filters/lpf))))) {
my $w = $in->wait_message(N("Printerdrake"),
N("Removing LPRng..."));
$in->do_pkgs->remove_nodeps('LPRng');
}
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/sbin/lpf
+ (!files_exist((qw(/usr/sbin/lpf
/usr/sbin/lpd
/sbin/ifconfig
/usr/bin/gpr
@@ -2801,14 +2764,14 @@ sub install_spooler {
sleep(1);
};
# Start daemon
- printer::restart_service("lpd");
+ printer::services::restart("lpd");
# Set the LPD tools as defaults for "lpr", "lpq", "lprm", ...
- printer::set_alternative("lpr","/usr/bin/lpr-lpd");
- printer::set_alternative("lpq","/usr/bin/lpq-lpd");
- printer::set_alternative("lprm","/usr/bin/lprm-lpd");
- printer::set_alternative("lpc","/usr/sbin/lpc-lpd");
+ set_alternative("lpr","/usr/bin/lpr-lpd");
+ set_alternative("lpq","/usr/bin/lpq-lpd");
+ set_alternative("lprm","/usr/bin/lprm-lpd");
+ set_alternative("lpc","/usr/sbin/lpc-lpd");
# Remove PDQ panic buttons from the user's KDE Desktops
- printer::pdq_panic_button("remove");
+ printer::main::pdq_panic_button("remove");
}
# Should it be started at boot time?
start_spooler_on_boot($printer, $in, "lpd");
@@ -2818,13 +2781,13 @@ sub install_spooler {
N("Checking installed software..."));
# "LPRng" conflicts with "lpr", remove "lpr"
if ((!$::testing) &&
- (printer::files_exist((qw(/usr/sbin/lpf))))) {
+ (files_exist((qw(/usr/sbin/lpf))))) {
my $w = $in->wait_message(N("Printerdrake"),
N("Removing LPD..."));
$in->do_pkgs->remove_nodeps('lpr');
}
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/lib/filters/lpf
+ (!files_exist((qw(/usr/lib/filters/lpf
/usr/sbin/lpd
/sbin/ifconfig
/usr/bin/gpr
@@ -2840,17 +2803,17 @@ sub install_spooler {
sleep(1);
};
# Start daemon
- printer::restart_service("lpd");
+ printer::services::restart("lpd");
# Set the LPRng tools as defaults for "lpr", "lpq", "lprm", ...
- printer::set_alternative("lpr","/usr/bin/lpr-lpd");
- printer::set_alternative("lpq","/usr/bin/lpq-lpd");
- printer::set_alternative("lprm","/usr/bin/lprm-lpd");
- printer::set_alternative("lp","/usr/bin/lp-lpd");
- printer::set_alternative("cancel","/usr/bin/cancel-lpd");
- printer::set_alternative("lpstat","/usr/bin/lpstat-lpd");
- printer::set_alternative("lpc","/usr/sbin/lpc-lpd");
+ set_alternative("lpr","/usr/bin/lpr-lpd");
+ set_alternative("lpq","/usr/bin/lpq-lpd");
+ set_alternative("lprm","/usr/bin/lprm-lpd");
+ set_alternative("lp","/usr/bin/lp-lpd");
+ set_alternative("cancel","/usr/bin/cancel-lpd");
+ set_alternative("lpstat","/usr/bin/lpstat-lpd");
+ set_alternative("lpc","/usr/sbin/lpc-lpd");
# Remove PDQ panic buttons from the user's KDE Desktops
- printer::pdq_panic_button("remove");
+ printer::main::pdq_panic_button("remove");
}
# Should it be started at boot time?
start_spooler_on_boot($printer, $in, "lpd");
@@ -2859,7 +2822,7 @@ sub install_spooler {
my $w = $in->wait_message(N("Printerdrake"),
N("Checking installed software..."));
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/pdq
+ (!files_exist((qw(/usr/bin/pdq
/usr/X11R6/bin/xpdq))))) {
$in->do_pkgs->install('pdq');
}
@@ -2873,16 +2836,16 @@ sub install_spooler {
# PDQ has no daemon, so nothing needs to be started
# Set the PDQ tools as defaults for "lpr", "lpq", "lprm", ...
- printer::set_alternative("lpr","/usr/bin/lpr-pdq");
- printer::set_alternative("lpq","/usr/bin/lpq-foomatic");
- printer::set_alternative("lprm","/usr/bin/lprm-foomatic");
+ set_alternative("lpr","/usr/bin/lpr-pdq");
+ set_alternative("lpq","/usr/bin/lpq-foomatic");
+ set_alternative("lprm","/usr/bin/lprm-foomatic");
# Add PDQ panic buttons to the user's KDE Desktops
- printer::pdq_panic_button("add");
+ printer::main::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");
+ printer::main::SIGHUP_daemon("devfs");
}
1;
}
@@ -2895,7 +2858,7 @@ sub setup_default_spooler {
my $str_spooler =
$in->ask_from_list_(N("Select Printer Spooler"),
N("Which printing system (spooler) do you want to use?"),
- [ printer::spooler() ],
+ [ printer::main::spooler() ],
$printer::spooler_inv{$printer->{SPOOLER}},
) or return;
$printer->{SPOOLER} = $printer::spooler{$str_spooler};
@@ -2906,24 +2869,24 @@ sub setup_default_spooler {
}
if ($printer->{SPOOLER} ne $oldspooler) {
# Remove the local printers from Star Office/OpenOffice.org/GIMP
- printer::removelocalprintersfromapplications($printer);
+ printer::main::removelocalprintersfromapplications($printer);
# Get the queues of this spooler
{
my $w = $in->wait_message(N("Printerdrake"),
N("Reading printer data..."));
- printer::read_configured_queues($printer);
+ printer::main::read_configured_queues($printer);
}
# Copy queues from former spooler
copy_queues_from($printer, $in, $oldspooler);
# Re-read the printer database (CUPS has additional drivers, PDQ
# has no raw queue)
- %printer::thedb = ();
+ %printer::main::thedb = ();
#my $w = $in->wait_message(N("Printerdrake"),
# N("Reading printer database..."));
- #printer::read_printer_db($printer->{SPOOLER});
+ #printer::main::read_printer_db($printer->{SPOOLER});
}
# Save spooler choice
- printer::set_default_spooler($printer);
+ printer::default::set_spooler($printer);
return $printer->{SPOOLER};
}
@@ -2933,14 +2896,14 @@ sub configure_queue {
N("Configuring printer \"%s\"...",
$printer->{currentqueue}{queue}));
$printer->{complete} = 1;
- printer::configure_queue($printer);
+ printer::main::configure_queue($printer);
$printer->{complete} = 0;
}
sub install_foomatic {
my ($in) = @_;
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/foomatic-configure
+ (!files_exist((qw(/usr/bin/foomatic-configure
/usr/lib/perl5/vendor_perl/5.8.0/Foomatic/DB.pm)
)))) {
my $w = $in->wait_message(N("Printerdrake"),
@@ -2967,7 +2930,7 @@ sub main {
# Save the user mode, so that the same one is used on the next start
# of Printerdrake
- printer::set_usermode($::expert);
+ printer::main::set_usermode($::expert);
# Default printer name, we do not use "lp" so that one can switch the
# default printer under LPD without needing to rename another printer.
@@ -2980,14 +2943,14 @@ sub main {
my $w = $in->wait_message(N("Printerdrake"),
N("Checking installed software..."));
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/bin/foomatic-configure
+ (!files_exist((qw(/usr/bin/foomatic-configure
/usr/lib/perl5/vendor_perl/5.8.0/Foomatic/DB.pm
/usr/bin/escputil
/usr/share/printer-testpages/testprint.ps
/usr/bin/nmap
/usr/bin/scli
),
- (printer::files_exist("/usr/bin/gimp") ?
+ (files_exist("/usr/bin/gimp") ?
"/usr/lib/gimp/1.2/plug-ins/print" : ())
)))) {
$in->do_pkgs->install('foomatic','printer-utils','printer-testpages','nmap','scli',
@@ -2995,14 +2958,14 @@ sub main {
}
# only experts should be asked for the spooler
- !$::expert and $printer->{SPOOLER} ||= 'cups';
+ $printer->{SPOOLER} ||= 'cups' if $::expert;
}
# If we have chosen a spooler, install it and mark it as default spooler
if (($printer->{SPOOLER}) && ($printer->{SPOOLER} ne '')) {
if (!install_spooler($printer, $in, $upNetwork)) { return }
- printer::set_default_spooler($printer);
+ printer::default::set_spooler($printer);
}
# Turn on printer autodetection by default
@@ -3025,7 +2988,7 @@ sub main {
((!defined($printer->{DEFAULT})) || ($printer->{DEFAULT} eq ''))) {
my $w = $in->wait_message(N("Printerdrake"),
N("Preparing Printerdrake..."));
- $printer->{DEFAULT} = printer::get_default_printer($printer);
+ $printer->{DEFAULT} = printer::default::get_printer($printer);
if ($printer->{DEFAULT}) {
# If a CUPS system has only remote printers and no default
# printer defined, it defines the first printer whose
@@ -3033,17 +2996,15 @@ sub main {
# daemon, so on every start another printer gets the default
# printer. To avoid this, make sure that the default printer
# is defined.
- printer::set_default_printer($printer);
- } else {
- $printer->{DEFAULT} = '';
- }
+ printer::default::set_printer($printer);
+ } else { $printer->{DEFAULT} = '' }
}
# Configure the current printer queues in applications
{
my $w = $in->wait_message(N("Printerdrake"),
N("Configuring applications..."));
- printer::configureapplications($printer);
+ printer::main::configureapplications($printer);
}
if ($editqueue) {
@@ -3082,7 +3043,7 @@ sub main {
my $havelocalnetworks_or_expert =
(($::expert) ||
(check_network($printer, $in, $upNetwork, 1) &&
- (printer::getIPsInLocalNetworks() != ())));
+ (printer::detect::getIPsInLocalNetworks() != ())));
# Show a queue list window when there is at least one queue,
# when we are in expert mode, or when we are not in the
# installation.
@@ -3109,7 +3070,7 @@ sub main {
} elsif ($printer->{SPOOLER} eq "cups") {
($cursorpos) =
grep { /!$printer->{DEFAULT}:[^!]*$/ }
- printer::get_cups_remote_queues($printer);
+ printer::main::get_cups_remote_queues($printer);
}
}
# Generate the list of available printers
@@ -3120,7 +3081,7 @@ sub main {
keys(%{$printer->{configured}
|| {}})),
($printer->{SPOOLER} eq "cups" ?
- printer::get_cups_remote_queues($printer) :
+ printer::main::get_cups_remote_queues($printer) :
())))
);
my $noprinters = ($#printerlist < 0);
@@ -3194,23 +3155,23 @@ sub main {
);
# Toggle expert mode and standard mode
if ($menuchoice eq "\@usermode") {
- printer::set_usermode(!$::expert);
+ printer::main::set_usermode(!$::expert);
# make sure that the "cups-drivers" package gets
# installed when switching into expert mode
if (($::expert) && ($printer->{SPOOLER} eq "cups")) {
install_spooler($printer, $in, $upNetwork);
}
# Read printer database for the new user mode
- %printer::thedb = ();
+ %printer::main::thedb = ();
#my $w = $in->wait_message(N("Printerdrake"),
# N("Reading printer database..."));
- #printer::read_printer_db($printer->{SPOOLER});
+ #printer::main::read_printer_db($printer->{SPOOLER});
# Re-read printer queues to switch the tree
# structure between expert/normal mode.
my $w = $in->wait_message
(N("Printerdrake"),
N("Reading printer data..."));
- printer::read_configured_queues($printer);
+ printer::main::read_configured_queues($printer);
$cursorpos = "::";
next;
}
@@ -3249,7 +3210,7 @@ sub main {
}
}
# Save the default spooler
- printer::set_default_spooler($printer);
+ printer::default::set_spooler($printer);
#- Close printerdrake
$menuchoice eq "\@quit" and last;
}
@@ -3257,7 +3218,7 @@ sub main {
$printer->{NEW} = 1;
#- Set default values for a new queue
$printer::printer_type_inv{$printer->{TYPE}} or
- $printer->{TYPE} = printer::default_printer_type($printer);
+ $printer->{TYPE} = printer::default::printer_type($printer);
$printer->{currentqueue} = { queue => $queue,
foomatic => 0,
desc => "",
@@ -3416,7 +3377,7 @@ sub main {
if ($printer->{configured}{$queue}) {
# Here we must regenerate the menu entry, because the
# parameters can be changed.
- printer::make_menuentry($printer,$queue);
+ printer::main::make_menuentry($printer,$queue);
$printer->{configured}{$queue}{queuedata}{menuentry} =~
/!([^!]+)$/;
$infoline = $1 .
@@ -3473,7 +3434,7 @@ What do you want to modify on this printer?",
$printer->{currentqueue} = {};
my $driver;
if ($printer->{configured}{$queue}) {
- printer::copy_printer_params($printer->{configured}{$queue}{queuedata}, $printer->{currentqueue});
+ printer::main::copy_printer_params($printer->{configured}{$queue}{queuedata}, $printer->{currentqueue});
#- Keep in mind the printer driver which was used, so it
#- can be determined whether the driver is only
#- available in expert and so for setting the options
@@ -3512,12 +3473,12 @@ What do you want to modify on this printer?",
(N("Printerdrake"),
N("Removing old printer \"%s\"...",
$printer->{OLD_QUEUE}));
- printer::remove_queue($printer, $printer->{OLD_QUEUE});
+ printer::main::remove_queue($printer, $printer->{OLD_QUEUE});
# If the default printer was renamed, correct the
# the default printer setting of the spooler
if ($queue eq $printer->{DEFAULT}) {
$printer->{DEFAULT} = $printer->{QUEUE};
- printer::set_default_printer($printer);
+ printer::default::set_printer($printer);
}
$queue = $printer->{QUEUE};
}
@@ -3534,11 +3495,11 @@ What do you want to modify on this printer?",
configure_queue($printer, $in);
} elsif ($modify eq N("Set this printer as the default")) {
$printer->{DEFAULT} = $queue;
- printer::set_default_printer($printer);
+ printer::default::set_printer($printer);
$in->ask_warn(N("Default printer"),
N("The printer \"%s\" is set as the default printer now.", $queue));
} elsif ($modify eq N("Add this printer to Star Office/OpenOffice.org/GIMP")) {
- if (printer::addcupsremotetoapplications
+ if (printer::main::addcupsremotetoapplications
($printer, $queue)) {
$in->ask_warn(N("Adding printer to Star Office/OpenOffice.org/GIMP"),
N("The printer \"%s\" was successfully added to Star Office/OpenOffice.org/GIMP.", $queue));
@@ -3547,7 +3508,7 @@ What do you want to modify on this printer?",
N("Failed to add the printer \"%s\" to Star Office/OpenOffice.org/GIMP.", $queue));
}
} elsif ($modify eq N("Remove this printer from Star Office/OpenOffice.org/GIMP")) {
- if (printer::removeprinterfromapplications
+ if (printer::main::removeprinterfromapplications
($printer, $queue)) {
$in->ask_warn(N("Removing printer from Star Office/OpenOffice.org/GIMP"),
N("The printer \"%s\" was successfully removed from Star Office/OpenOffice.org/GIMP.", $queue));
@@ -3566,7 +3527,7 @@ What do you want to modify on this printer?",
my $w = $in->wait_message
(N("Printerdrake"),
N("Removing printer \"%s\"...", $queue));
- if (printer::remove_queue($printer, $queue)) {
+ if (printer::main::remove_queue($printer, $queue)) {
$editqueue = 0;
# Define a new default printer if we have
# removed the default one
@@ -3574,7 +3535,7 @@ What do you want to modify on this printer?",
my @k = sort(keys(%{$printer->{configured}}));
if (@k) {
$printer->{DEFAULT} = $k[0];
- printer::set_default_printer($printer);
+ printer::default::set_printer($printer);
} else {
$printer->{DEFAULT} = "";
}
@@ -3619,7 +3580,7 @@ What do you want to modify on this printer?",
if ($::isInstall && !$::expert && !$menushown && !$continue) {
my $w = $in->wait_message(N("Printerdrake"),
N("Configuring applications..."));
- printer::configureapplications($printer);
+ printer::main::configureapplications($printer);
}
# Delete some variables
diff --git a/perl-install/printer/services.pm b/perl-install/printer/services.pm
new file mode 100644
index 000000000..1b68da96a
--- /dev/null
+++ b/perl-install/printer/services.pm
@@ -0,0 +1,61 @@
+package printer::services;
+
+use strict;
+use services;
+use run_program;
+
+sub restart ($) {
+ my ($service) = @_;
+ if (services::restart($service)) {
+ # CUPS needs some time to come up.
+ wait_for_cups() if $service eq "cups";
+ return 1;
+ } else { return 0 }
+}
+
+sub start ($) {
+ my ($service) = @_;
+ if (services::start($service)) {
+ # CUPS needs some time to come up.
+ wait_for_cups() if $service eq "cups";
+ return 1;
+ } else { return 0 }
+}
+
+sub start_not_running_service ($) {
+ my ($service) = @_;
+ # The exit status is not zero when the service is not running
+ if (services::start_not_running_service($service)) {
+ return 0;
+ } else {
+ run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", "start");
+ if (($? >> 8) != 0) {
+ return 0;
+ } else {
+ # CUPS needs some time to come up.
+ wait_for_cups() if $service eq "cups";
+ return 1;
+ }
+ }
+}
+
+sub wait_for_cups {
+ # CUPS needs some time to come up. Wait up to 30 seconds, checking
+ # whether CUPS is ready.
+ my $cupsready = 0;
+ my $i;
+ for ($i = 0; $i < 30; $i++) {
+ run_program::rooted($::prefix, "/usr/bin/lpstat", "-r");
+ if (($? >> 8) != 0) {
+ # CUPS is not ready, continue
+ sleep 1;
+ } else {
+ # CUPS is ready, quit
+ $cupsready = 1;
+ last;
+ }
+ }
+ return $cupsready;
+}
+
+1;
diff --git a/perl-install/services.pm b/perl-install/services.pm
index c48518816..3348b2bf6 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -1,11 +1,16 @@
package services; # $Id$
-use diagnostics;
-use strict;
+
+
#-######################################################################################
#- misc imports
#-######################################################################################
+
+use strict;
+use common;
+use run_program;
+
use common;
use run_program;
@@ -226,7 +231,7 @@ sub ask_standalone_gtk {
push @$on_services, $service if !member($service, @$on_services);
} else {
@$on_services = grep { $_ ne $service } @$on_services;
- } }), member($service, @$on_services))),
+ }}), member($service, @$on_services))),
map { my $a = $_;
gtkpack__(new Gtk::HBox(0,0), gtksignal_connect(new Gtk::Button(translate($a)),
clicked => sub { my $c = "service $service " . (lc($a) eq "start" ? "restart" : lc($a)) . " 2>&1"; local $_ = `$c`; s/\033\[[^mG]*[mG]//g;
@@ -286,4 +291,80 @@ sub services {
[ map { $_->[0] } @l ], [ map { $_->[0] } grep { $_->[1] } @l ];
}
+
+
+
+
+
+# the following functions are mostly by printer related modules
+
+#-if we are in an DrakX config
+our $prefix = "";
+
+
+sub restart ($) {
+ my ($service) = @_;
+ # Exit silently if the service is not installed
+ return 1 if !(-x "$prefix/etc/rc.d/init.d/$service");
+ run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "restart");
+}
+
+sub start ($) {
+ my ($service) = @_;
+ # Exit silently if the service is not installed
+ return 1 if !(-x "$prefix/etc/rc.d/init.d/$service");
+ run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "start");
+ return (($? >> 8) != 0) ? 0 : 1;
+}
+
+sub start_not_running_service ($) {
+ my ($service) = @_;
+ # Exit silently if the service is not installed
+ return 1 if !(-x "$prefix/etc/rc.d/init.d/$service");
+ run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "status");
+ return (($? >> 8) != 0) ? 0 : 1;
+}
+
+sub stop ($) {
+ my ($service) = @_;
+ # Exit silently if the service is not installed
+ return 1 if !(-x "$prefix/etc/rc.d/init.d/$service");
+ run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "stop");
+ return (($? >> 8) != 0) ? 0 : 1;
+}
+
+sub is_service_running ($) {
+ my ($service) = @_;
+ # Exit silently if the service is not installed
+ return 0 if !(-x "$prefix/etc/rc.d/init.d/$service");
+ run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "status");
+ # The exit status is not zero when the service is not running
+ return (($? >> 8) != 0) ? 0 : 1;
+}
+
+sub starts_on_boot ($) {
+ my ($service) = @_;
+ local *F;
+ open F, ($::testing ? $prefix : "chroot $prefix/ ") .
+ "/bin/sh -c \"export LC_ALL=C; /sbin/chkconfig --list $service 2>&1\" |" or
+ return 0;
+ while (my $line = <F>) {
+ chomp $line;
+ if ($line =~ /:on/) {
+ close F;
+ return 1;
+ }
+ }
+ close F;
+ return 0;
+}
+
+sub start_service_on_boot ($) {
+ my ($service) = @_;
+ run_program::rooted($prefix, "/sbin/chkconfig", "--add", $service)
+ or return 0;
+ return 1;
+}
+
+
1;
diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake
index 19770d97f..a73253d05 100755
--- a/perl-install/standalone/printerdrake
+++ b/perl-install/standalone/printerdrake
@@ -21,11 +21,11 @@
use lib qw(/usr/lib/libDrakX);
use standalone; #- warning, standalone must be loaded very first, for 'explanations'
-
-use interactive;
-use printerdrake;
-use printer;
use common;
+use interactive;
+use printer::printerdrake;
+use printer::main;
+use modules;
use c;
local $_ = join '', @ARGV;
@@ -38,7 +38,7 @@ if (/-expert/) {
} elsif (/-beginner/) {
$::expert = 0;
} else {
- printer::get_usermode ();
+ printer::main::get_usermode ();
}
$::noauto = /-noauto/;
$::testing = /-testing/;
@@ -49,33 +49,33 @@ my $in = 'interactive'->vnew('su', 'printer-mdk');
my $commandline = $_;
-exit 0 if !printerdrake::first_time_dialog($printer, $in, 1);
+exit 0 unless printer::printerdrake::first_time_dialog($printer, $in, 1);
{
# Check whether Foomatic is installed and install it if necessary
-printerdrake::install_foomatic($in);
+printer::printerdrake::install_foomatic($in);
my $w = $in->wait_message(N("Printerdrake"), N("Reading printer data ..."));
# Get what was installed before
-eval { $printer = printer::getinfo('') };
+eval { $printer = printer::main::getinfo('') };
# Choose the spooler by command line options
$commandline =~ /-cups/ and
- $printer->{SPOOLER} = 'cups' and printer::read_configured_queues($printer);
+ $printer->{SPOOLER} = 'cups' and printer::main::read_configured_queues($printer);
$commandline =~ /-lpr/ and
- $printer->{SPOOLER} = 'lpd' and printer::read_configured_queues($printer);
+ $printer->{SPOOLER} = 'lpd' and printer::main::read_configured_queues($printer);
$commandline =~ /-lpd/ and
- $printer->{SPOOLER} = 'lpd' and printer::read_configured_queues($printer);
+ $printer->{SPOOLER} = 'lpd' and printer::main::read_configured_queues($printer);
$commandline =~ /-lprng/ and
- $printer->{SPOOLER} ='lprng' and printer::read_configured_queues($printer);
+ $printer->{SPOOLER} ='lprng' and printer::main::read_configured_queues($printer);
$commandline =~ /-pdq/ and
- $printer->{SPOOLER} = 'pdq' and printer::read_configured_queues($printer);
+ $printer->{SPOOLER} = 'pdq' and printer::main::read_configured_queues($printer);
-r '/etc/modules.conf' and modules::mergein_conf('/etc/modules.conf');
}
begin:
$::isEmbedded and kill 'USR2', $::CCPID;
-printerdrake::main($printer, $in, 1);
+printer::printerdrake::main($printer, $in, 1);
$::isEmbedded ? kill('USR1', $::CCPID) : $in->exit(0);
goto begin;
word and group file." msgstr "" "Ti permitit de fai girai unu grupu de computadoras in su pròpiu domìniu " "Network Information Service cun sa pròpiu password e su pròpiu file de grupu." #: authentication.pm:68 #, c-format msgid "Windows Domain:" msgstr "Windows Domain:" #: authentication.pm:68 #, fuzzy, c-format msgid "" "Winbind allows the system to retrieve information and authenticate users in " "a Windows domain." msgstr "" "iWinbind permitit a su sistema de agatai scedas e autentigai umperadoris in " "d-unu domìniu Windows." #: authentication.pm:69 #, c-format msgid "Kerberos 5 :" msgstr "" #: authentication.pm:69 #, c-format msgid "With Kerberos and Ldap for authentication in Active Directory Server " msgstr "cun Kerberos e Ldap po si autentigai in Active Directory Server " #: authentication.pm:109 authentication.pm:143 authentication.pm:162 #: authentication.pm:163 authentication.pm:189 authentication.pm:213 #: authentication.pm:898 #, c-format msgid " " msgstr "" #: authentication.pm:110 authentication.pm:144 authentication.pm:190 #: authentication.pm:214 #, c-format msgid "Welcome to the Authentication Wizard" msgstr "" #: authentication.pm:112 #, c-format msgid "" "You have selected LDAP authentication. Please review the configuration " "options below " msgstr "" #: authentication.pm:114 authentication.pm:169 #, c-format msgid "LDAP Server" msgstr "LDAP Server" #: authentication.pm:115 authentication.pm:170 #, fuzzy, c-format msgid "Base dn" msgstr "LDAP Base dn" #: authentication.pm:116 #, c-format msgid "Fetch base Dn " msgstr "" #: authentication.pm:118 authentication.pm:173 #, c-format msgid "Use encrypt connection with TLS " msgstr "" #: authentication.pm:119 authentication.pm:174 #, c-format msgid "Download CA Certificate " msgstr "" #: authentication.pm:121 authentication.pm:154 #, c-format msgid "Use Disconnect mode " msgstr "" #: authentication.pm:122 authentication.pm:175 #, fuzzy, c-format msgid "Use anonymous BIND " msgstr "Imprea Anonymous BIND" #: authentication.pm:123 authentication.pm:126 authentication.pm:128 #: authentication.pm:132 #, c-format msgid " " msgstr "" #: authentication.pm:124 authentication.pm:176 #, c-format msgid "Bind DN " msgstr "" #: authentication.pm:125 authentication.pm:177 #, fuzzy, c-format msgid "Bind Password " msgstr "Password" #: authentication.pm:127 #, c-format msgid "Advanced path for group " msgstr "" #: authentication.pm:129 #, fuzzy, c-format msgid "Password base" msgstr "Password" #: authentication.pm:130 #, fuzzy, c-format msgid "Group base" msgstr "IP Grupu" #: authentication.pm:131 #, c-format msgid "Shadow base" msgstr "" #: authentication.pm:146 #, c-format msgid "" "You have selected Kerberos 5 authentication. Please review the configuration " "options below " msgstr "" #: authentication.pm:148 #, fuzzy, c-format msgid "Realm " msgstr "Nòmini beru" #: authentication.pm:150 #, fuzzy, c-format msgid "KDCs Servers" msgstr "LDAP Server" #: authentication.pm:152 #, c-format msgid "Use DNS to locate KDC for the realm" msgstr "" #: authentication.pm:153 #, c-format msgid "Use DNS to locate realms" msgstr "" #: authentication.pm:158 #, c-format msgid "Use local file for users information" msgstr "" #: authentication.pm:159 #, fuzzy, c-format msgid "Use Ldap for users information" msgstr "Scedas discu tostau" #: authentication.pm:165 #, c-format msgid "" "You have selected Kerberos 5 for authentication, now you must choose the " "type of users information " msgstr "" #: authentication.pm:171 #, c-format msgid "Fecth base Dn " msgstr "" #: authentication.pm:192 #, c-format msgid "" "You have selected NIS authentication. Please review the configuration " "options below " msgstr "" #: authentication.pm:194 #, c-format msgid "NIS Domain" msgstr "Domìniu NIS" #: authentication.pm:195 #, c-format msgid "NIS Server" msgstr "Server NIS" #: authentication.pm:216 #, c-format msgid "" "You have selected Windows Domain authentication. Please review the " "configuration options below " msgstr "" #: authentication.pm:220 #, fuzzy, c-format msgid "Domain Model " msgstr "Domìniu" #: authentication.pm:222 #, c-format msgid "Active Directory Realm " msgstr "Active Directory Realm " #: authentication.pm:223 #, fuzzy, c-format msgid "DNS Domain" msgstr "Domìniu NIS" #: authentication.pm:224 #, fuzzy, c-format msgid "DC Server" msgstr "LDAP Server" #: authentication.pm:238 authentication.pm:254 #, c-format msgid "Authentication" msgstr "Autentigadura" #: authentication.pm:240 #, c-format msgid "Authentication method" msgstr "Mètudu de autentigadura" #. -PO: keep this short or else the buttons will not fit in the window #: authentication.pm:245 #, c-format msgid "No password" msgstr "Nisçuna password" #: authentication.pm:266 #, c-format msgid "This password is too short (it must be at least %d characters long)" msgstr "Custa password est tropu curtza (bolit longa a su mancu %d caràteris)" #: authentication.pm:377 #, c-format msgid "Cannot use broadcast with no NIS domain" msgstr "No fait a impreai broadcast sentza de domìniu NIS" #: authentication.pm:893 #, c-format msgid "Select file" msgstr "Sçobera file" #: authentication.pm:899 #, c-format msgid "Domain Windows for authentication : " msgstr "" #: authentication.pm:901 #, c-format msgid "Domain Admin User Name" msgstr "" #: authentication.pm:902 #, c-format msgid "Domain Admin Password" msgstr "" #. -PO: these messages will be displayed at boot time in the BIOS, use only ASCII (7bit) #: bootloader.pm:994 #, c-format msgid "" "Welcome to the operating system chooser!\n" "\n" "Choose an operating system from the list above or\n" "wait for default boot.\n" "\n" msgstr "" "Beni beniu a su sçoberadori de sistema obradori!\n" "\n" "Sçobera unu sistema obradori de sa lista asuta o\n" "abeta po s'alluidura predefinia.\n" "\n" #: bootloader.pm:1171 #, c-format msgid "LILO with text menu" msgstr "LILO cun lista scriturali" #: bootloader.pm:1172 #, c-format msgid "GRUB with graphical menu" msgstr "GRUB cun lista gràfiga" #: bootloader.pm:1173 #, c-format msgid "GRUB with text menu" msgstr "GRUB cun lista scriturali" #: bootloader.pm:1174 #, c-format msgid "Yaboot" msgstr "Yaboot" #: bootloader.pm:1175 #, c-format msgid "SILO" msgstr "" #: bootloader.pm:1259 #, c-format msgid "not enough room in /boot" msgstr "no dui at spàtziu abasta in /boot" #: bootloader.pm:1985 #, c-format msgid "You can not install the bootloader on a %s partition\n" msgstr "No podis aposentai su bootloader in d-una pratzidura %s\n" #: bootloader.pm:2106 #, c-format msgid "" "Your bootloader configuration must be updated because partition has been " "renumbered" msgstr "" "S'assètiu de su bootloader bolit ajorronau ca sa pratzidura d'ant torrada a " "numerai" #: bootloader.pm:2119 #, c-format msgid "" "The bootloader can not be installed correctly. You have to boot rescue and " "choose \"%s\"" msgstr "No fait a aposentai beni su bootloader. Depis allui e sçoberai \"%s\"" #: bootloader.pm:2120 #, c-format msgid "Re-install Boot Loader" msgstr "Torra a aposentai su Boot Loader" #: common.pm:142 #, fuzzy, c-format msgid "B" msgstr "KB" #: common.pm:142 #, c-format msgid "KB" msgstr "KB" #: common.pm:142 #, c-format msgid "MB" msgstr "MB" #: common.pm:142 #, c-format msgid "GB" msgstr "GB" #: common.pm:142 common.pm:151 #, c-format msgid "TB" msgstr "TB" #: common.pm:159 #, c-format msgid "%d minutes" msgstr "%d minudus" #: common.pm:161 #, c-format msgid "1 minute" msgstr "1 minudu" #: common.pm:163 #, c-format msgid "%d seconds" msgstr "%d segundus" #: common.pm:383 #, c-format msgid "command %s missing" msgstr "" #: diskdrake/dav.pm:17 #, c-format msgid "" "WebDAV is a protocol that allows you to mount a web server's directory\n" "locally, and treat it like a local filesystem (provided the web server is\n" "configured as a WebDAV server). If you would like to add WebDAV mount\n" "points, select \"New\"." msgstr "" "WebDAV est unu protocollu ki ti permitit de una directory de unu server web\n" "in locali, e a da manijai ke unu filesystem locali (postu ki su server web " "siat\n" "assetiau ke WebDAV server). Ki bolis açungi puntus de càrrigu WebDAV,\n" "sçobera \"Nou\"." #: diskdrake/dav.pm:25 #, c-format msgid "New" msgstr "Nou" #: diskdrake/dav.pm:63 diskdrake/interactive.pm:414 diskdrake/smbnfs_gtk.pm:75 #, c-format msgid "Unmount" msgstr "Scàrriga" #: diskdrake/dav.pm:64 diskdrake/interactive.pm:410 diskdrake/smbnfs_gtk.pm:76 #, c-format msgid "Mount" msgstr "Càrriga" #: diskdrake/dav.pm:65 #, c-format msgid "Server" msgstr "Server" #: diskdrake/dav.pm:66 diskdrake/interactive.pm:404 #: diskdrake/interactive.pm:725 diskdrake/interactive.pm:743 #: diskdrake/interactive.pm:747 diskdrake/removable.pm:23 #: diskdrake/smbnfs_gtk.pm:79 #, c-format msgid "Mount point" msgstr "Puntu de càrrigu" #: diskdrake/dav.pm:67 diskdrake/interactive.pm:406 #: diskdrake/interactive.pm:1160 diskdrake/removable.pm:24 #: diskdrake/smbnfs_gtk.pm:80 #, c-format msgid "Options" msgstr "Sceras" #: diskdrake/dav.pm:68 interactive.pm:387 interactive/gtk.pm:453 #, c-format msgid "Remove" msgstr "Burra" #: diskdrake/dav.pm:69 diskdrake/hd_gtk.pm:187 diskdrake/removable.pm:26 #: diskdrake/smbnfs_gtk.pm:82 interactive/http.pm:151 #, c-format msgid "Done" msgstr "Fatu" #: diskdrake/dav.pm:78 diskdrake/hd_gtk.pm:128 diskdrake/hd_gtk.pm:292 #: diskdrake/interactive.pm:247 diskdrake/interactive.pm:260 #: diskdrake/interactive.pm:453 diskdrake/interactive.pm:524 #: diskdrake/interactive.pm:542 diskdrake/interactive.pm:547 #: diskdrake/interactive.pm:715 diskdrake/interactive.pm:1000 #: diskdrake/interactive.pm:1051 diskdrake/interactive.pm:1206 #: diskdrake/interactive.pm:1219 diskdrake/interactive.pm:1222 #: diskdrake/interactive.pm:1490 diskdrake/smbnfs_gtk.pm:42 do_pkgs.pm:23 #: do_pkgs.pm:28 do_pkgs.pm:44 do_pkgs.pm:60 do_pkgs.pm:65 do_pkgs.pm:82 #: fsedit.pm:246 interactive/http.pm:117 interactive/http.pm:118 #: modules/interactive.pm:19 scanner.pm:95 scanner.pm:106 scanner.pm:113 #: scanner.pm:120 wizards.pm:95 wizards.pm:99 wizards.pm:121 #, c-format msgid "Error" msgstr "Faddina" #: diskdrake/dav.pm:86 #, c-format msgid "Please enter the WebDAV server URL" msgstr "Intra sa URL de su server WebDAV" #: diskdrake/dav.pm:90 #, c-format msgid "The URL must begin with http:// or https://" msgstr "Sa URL depit cumentzai cun http:// o https://" #: diskdrake/dav.pm:106 diskdrake/hd_gtk.pm:417 diskdrake/interactive.pm:306 #: diskdrake/interactive.pm:391 diskdrake/interactive.pm:600 #: diskdrake/interactive.pm:818 diskdrake/interactive.pm:882 #: diskdrake/interactive.pm:1031 diskdrake/interactive.pm:1073 #: diskdrake/interactive.pm:1074 diskdrake/interactive.pm:1300 #: diskdrake/interactive.pm:1338 diskdrake/interactive.pm:1489 do_pkgs.pm:19 #: do_pkgs.pm:39 do_pkgs.pm:57 do_pkgs.pm:77 harddrake/sound.pm:442 #, c-format msgid "Warning" msgstr "Atentu" #: diskdrake/dav.pm:106 #, fuzzy, c-format msgid "Are you sure you want to delete this mount point?" msgstr "Bolis cricai custu butoni?" #: diskdrake/dav.pm:124 #, c-format msgid "Server: " msgstr "Server: " #: diskdrake/dav.pm:125 diskdrake/interactive.pm:498 #: diskdrake/interactive.pm:1362 diskdrake/interactive.pm:1450 #, c-format msgid "Mount point: " msgstr "Puntu de càrrigu: " #: diskdrake/dav.pm:126 diskdrake/interactive.pm:1457 #, c-format msgid "Options: %s" msgstr "Sceras: %s" #: diskdrake/hd_gtk.pm:61 diskdrake/interactive.pm:301 #: diskdrake/smbnfs_gtk.pm:22 fs/mount_point.pm:108 #: fs/partitioning_wizard.pm:53 fs/partitioning_wizard.pm:236 #: fs/partitioning_wizard.pm:244 fs/partitioning_wizard.pm:283 #: fs/partitioning_wizard.pm:431 fs/partitioning_wizard.pm:494 #: fs/partitioning_wizard.pm:577 fs/partitioning_wizard.pm:580 #, c-format msgid "Partitioning" msgstr "Pratzimentu" #: diskdrake/hd_gtk.pm:73 #, c-format msgid "Click on a partition, choose a filesystem type then choose an action" msgstr "" #: diskdrake/hd_gtk.pm:110 diskdrake/interactive.pm:1181 #: diskdrake/interactive.pm:1191 diskdrake/interactive.pm:1244 #, c-format msgid "Read carefully" msgstr "Ligi cun coidau" #: diskdrake/hd_gtk.pm:110 #, c-format msgid "Please make a backup of your data first" msgstr "Fai una còpia de is dadus tuus po primu cosa" #: diskdrake/hd_gtk.pm:111 diskdrake/interactive.pm:240 #, c-format msgid "Exit" msgstr "Bessi" #: diskdrake/hd_gtk.pm:111 #, c-format msgid "Continue" msgstr "Sighi" #: diskdrake/hd_gtk.pm:182 fs/partitioning_wizard.pm:553 interactive.pm:653 #: interactive/gtk.pm:811 interactive/gtk.pm:829 interactive/gtk.pm:850 #: ugtk2.pm:936 #, c-format msgid "Help" msgstr "Ajudu" #: diskdrake/hd_gtk.pm:228 #, c-format msgid "" "You have one big Microsoft Windows partition.\n" "I suggest you first resize that partition\n" "(click on it, then click on \"Resize\")" msgstr "" "Tenis una pratzidura manna Microsoft Windows.\n" "Ti cunsillu de arremesurai custa pratzidura\n" "(cricanci apitzus, aputzis crica \"Arremesura\")" #: diskdrake/hd_gtk.pm:230 #, c-format msgid "Please click on a partition" msgstr "Crica in d-una pratzidura" #: diskdrake/hd_gtk.pm:244 diskdrake/smbnfs_gtk.pm:63 #, c-format msgid "Details" msgstr "A minudu" #: diskdrake/hd_gtk.pm:292 #, c-format msgid "No hard disk drives found" msgstr "Nisçunu discu agatau" #: diskdrake/hd_gtk.pm:323 #, c-format msgid "Unknown" msgstr "Disconnotu" #: diskdrake/hd_gtk.pm:388 #, fuzzy, c-format msgid "Ext4" msgstr "Bessi" #: diskdrake/hd_gtk.pm:388 fs/partitioning_wizard.pm:401 #, fuzzy, c-format msgid "XFS" msgstr "HFS" #: diskdrake/hd_gtk.pm:388 fs/partitioning_wizard.pm:401 #, c-format msgid "Swap" msgstr "Swap" #: diskdrake/hd_gtk.pm:388 fs/partitioning_wizard.pm:401 #, c-format msgid "SunOS" msgstr "SunOS" #: diskdrake/hd_gtk.pm:388 fs/partitioning_wizard.pm:401 #, c-format msgid "HFS" msgstr "HFS" #: diskdrake/hd_gtk.pm:388 fs/partitioning_wizard.pm:401 #, c-format msgid "Windows" msgstr "Windows" #: diskdrake/hd_gtk.pm:389 fs/partitioning_wizard.pm:402 services.pm:184 #, c-format msgid "Other" msgstr "Atru" #: diskdrake/hd_gtk.pm:389 diskdrake/interactive.pm:1377 #: fs/partitioning_wizard.pm:402 #, c-format msgid "Empty" msgstr "Sbuidu" #: diskdrake/hd_gtk.pm:396 #, c-format msgid "Filesystem types:" msgstr "Tipus de filesystem:" #: diskdrake/hd_gtk.pm:417 #, fuzzy, c-format msgid "This partition is already empty" msgstr "No fait a arremesurai custa pratzidura" #: diskdrake/hd_gtk.pm:426 #, c-format msgid "Use ``Unmount'' first" msgstr "Imprea ``Scàrriga'' po primu cosa" #: diskdrake/hd_gtk.pm:426 #, fuzzy, c-format msgid "Use ``%s'' instead (in expert mode)" msgstr "Imprea ``%s'' intamis" #: diskdrake/hd_gtk.pm:426 diskdrake/interactive.pm:405 #: diskdrake/interactive.pm:642 diskdrake/removable.pm:25 #: diskdrake/removable.pm:48 #, c-format msgid "Type" msgstr "Tipu" #: diskdrake/interactive.pm:211 #, c-format msgid "Choose another partition" msgstr "Sçobera un'atra pratzidura" #: diskdrake/interactive.pm:211 #, c-format msgid "Choose a partition" msgstr "Sçobera una pratzidura" #: diskdrake/interactive.pm:273 diskdrake/interactive.pm:382 #: interactive/curses.pm:512 #, c-format msgid "More" msgstr "Atru" #: diskdrake/interactive.pm:281 diskdrake/interactive.pm:294 #: diskdrake/interactive.pm:569 diskdrake/interactive.pm:1285 #, fuzzy, c-format msgid "Confirmation" msgstr "Assètiu" #: diskdrake/interactive.pm:281 #, c-format msgid "Continue anyway?" msgstr "Sigu comuncas?" #: diskdrake/interactive.pm:286 #, c-format msgid "Quit without saving" msgstr "Bessi sentza de sarvai" #: diskdrake/interactive.pm:286 #, c-format msgid "Quit without writing the partition table?" msgstr "Bessu sentza de scriri sa tàula de is pratziduras?" #: diskdrake/interactive.pm:294 #, c-format msgid "Do you want to save the /etc/fstab modifications?" msgstr "Bolis sarvai is mudas de /etc/fstab" #: diskdrake/interactive.pm:301 fs/partitioning_wizard.pm:283 #, c-format msgid "You need to reboot for the partition table modifications to take effect" msgstr "" "Depis torrai a allui po fai balli is mudas a sa tàula de is pratziduras" #: diskdrake/interactive.pm:306 #, c-format msgid "" "You should format partition %s.\n" "Otherwise no entry for mount point %s will be written in fstab.\n" "Quit anyway?" msgstr "" "Iast a depi formatai sa pratzidura %s.\n" "De ki no no fait a scriri nudda in fstab po su puntu de càrrigu%s.\n" "Bessu comuncas?" #: diskdrake/interactive.pm:319 #, c-format msgid "Clear all" msgstr "Lìmpia totu" #: diskdrake/interactive.pm:320 #, c-format msgid "Auto allocate" msgstr "Pratziduramentu automàtigu" #: diskdrake/interactive.pm:326 #, c-format msgid "Toggle to normal mode" msgstr "Modalidadi normali" #: diskdrake/interactive.pm:326 #, c-format msgid "Toggle to expert mode" msgstr "Modalidadi sperta" #: diskdrake/interactive.pm:338 #, c-format msgid "Hard drive information" msgstr "Scedas discu tostau" #: diskdrake/interactive.pm:371 #, c-format msgid "All primary partitions are used" msgstr "Totu is pratziduras primarjas funt impreadas" #: diskdrake/interactive.pm:372 #, c-format msgid "I can not add any more partitions" msgstr "No potzu açungi atras pratziduras" #: diskdrake/interactive.pm:373 #, c-format msgid "" "To have more partitions, please delete one to be able to create an extended " "partition" msgstr "" "Po tenni prus pratziduras, burrandi una po podi creai una pratzidura tirada" #: diskdrake/interactive.pm:384 #, c-format msgid "Reload partition table" msgstr "Torra a carrigai sa tàula de is pratziduras" #: diskdrake/interactive.pm:391 #, c-format msgid "Detailed information" msgstr "Scedas a minudu" #: diskdrake/interactive.pm:403 #, c-format msgid "View" msgstr "" #: diskdrake/interactive.pm:408 diskdrake/interactive.pm:831 #, c-format msgid "Resize" msgstr "Arremesura" #: diskdrake/interactive.pm:409 #, c-format msgid "Format" msgstr "Formata" #: diskdrake/interactive.pm:411 diskdrake/interactive.pm:963 #, c-format msgid "Add to RAID" msgstr "Açungi a RAID" #: diskdrake/interactive.pm:412 diskdrake/interactive.pm:982 #, c-format msgid "Add to LVM" msgstr "Açungi a LVM" #: diskdrake/interactive.pm:413 #, fuzzy, c-format msgid "Use" msgstr "ID umperadori" #: diskdrake/interactive.pm:415 #, c-format msgid "Delete" msgstr "Burra" #: diskdrake/interactive.pm:416 #, c-format msgid "Remove from RAID" msgstr "Burra de RAID" #: diskdrake/interactive.pm:417 #, c-format msgid "Remove from LVM" msgstr "Burra de LVM" #: diskdrake/interactive.pm:418 #, fuzzy, c-format msgid "Remove from dm" msgstr "Burra de LVM" #: diskdrake/interactive.pm:419 #, c-format msgid "Modify RAID" msgstr "Muda RAID" #: diskdrake/interactive.pm:420 #, c-format msgid "Use for loopback" msgstr "Imprea po loopback" #: diskdrake/interactive.pm:431 #, c-format msgid "Create" msgstr "Crea" #: diskdrake/interactive.pm:453 #, fuzzy, c-format msgid "Failed to mount partition" msgstr "Movi is file a sa pratzidura noa" #: diskdrake/interactive.pm:487 diskdrake/interactive.pm:489 #, c-format msgid "Create a new partition" msgstr "Crea una pratzidura noa" #: diskdrake/interactive.pm:491 #, c-format msgid "Start sector: " msgstr "Segadura de partèntzia: " #: diskdrake/interactive.pm:494 diskdrake/interactive.pm:1066 #, c-format msgid "Size in MB: " msgstr "Manniori in MB: " #: diskdrake/interactive.pm:496 diskdrake/interactive.pm:1067 #, c-format msgid "Filesystem type: " msgstr "Tipu de filesystem: " #: diskdrake/interactive.pm:502 #, c-format msgid "Preference: " msgstr "Preferèntzia: " #: diskdrake/interactive.pm:505 #, c-format msgid "Logical volume name " msgstr "" #: diskdrake/interactive.pm:507 #, fuzzy, c-format msgid "Encrypt partition" msgstr "Algoritmu de critadura" #: diskdrake/interactive.pm:508 #, fuzzy, c-format msgid "Encryption key " msgstr "Crai de cuadura" #: diskdrake/interactive.pm:509 diskdrake/interactive.pm:1494 #, c-format msgid "Encryption key (again)" msgstr "Crai de cuadura (torra)" #: diskdrake/interactive.pm:521 diskdrake/interactive.pm:1490 #, c-format msgid "The encryption keys do not match" msgstr "Is crais de cuadura no cunsonant" #: diskdrake/interactive.pm:522 #, fuzzy, c-format msgid "Missing encryption key" msgstr "Crai de cuadura de su filesystem" #: diskdrake/interactive.pm:542 #, c-format msgid "" "You can not create a new partition\n" "(since you reached the maximal number of primary partitions).\n" "First remove a primary partition and create an extended partition." msgstr "" "No podis creai una pratzidura noa\n" "(ses lòmpiu a su nùmeru permìtiu de pratziduras primarjas).\n" "Innantis burra una pratzidura primarja e creandi una tirada." #: diskdrake/interactive.pm:569 diskdrake/interactive.pm:1285 #: fs/partitioning.pm:48 #, c-format msgid "Check for bad blocks?" msgstr "" #: diskdrake/interactive.pm:600 #, c-format msgid "Remove the loopback file?" msgstr "Burru su file de loopback?" #: diskdrake/interactive.pm:623 #, c-format msgid "" "After changing type of partition %s, all data on this partition will be lost" msgstr "" "Apustis de sa muda de tipu de sa pratzidura %s, totu su ki dui at du perdis" #: diskdrake/interactive.pm:639 #, c-format msgid "Change partition type" msgstr "Muda tipu de pratzidura" #: diskdrake/interactive.pm:641 diskdrake/removable.pm:47 #, c-format msgid "Which filesystem do you want?" msgstr "Ita filesystem bolis?" #: diskdrake/interactive.pm:648 #, fuzzy, c-format msgid "Switching from %s to %s" msgstr "Mudai de ext2 a ext3" #: diskdrake/interactive.pm:683 #, c-format msgid "Set volume label" msgstr "" #: diskdrake/interactive.pm:685 #, c-format msgid "Beware, this will be written to disk as soon as you validate!" msgstr "" #: diskdrake/interactive.pm:686 #, c-format msgid "Beware, this will be written to disk only after formatting!" msgstr "" #: diskdrake/interactive.pm:688 #, c-format msgid "Which volume label?" msgstr "" #: diskdrake/interactive.pm:689 #, fuzzy, c-format msgid "Label:" msgstr "Etiketa" #: diskdrake/interactive.pm:710 #, c-format msgid "Where do you want to mount the loopback file %s?" msgstr "Aundi bolis carrigai su file de loopback %s?" #: diskdrake/interactive.pm:711 #, c-format msgid "Where do you want to mount device %s?" msgstr "Aundi bolis carrigai su trastu %s?" #: diskdrake/interactive.pm:716 #, c-format msgid "" "Cannot unset mount point as this partition is used for loop back.\n" "Remove the loopback first" msgstr "" "No fait a disassetiai su puntu de càrrigu ca sa pratzidura est po loopback.\n" "Boga su loopback innantis" #: diskdrake/interactive.pm:746 #, c-format msgid "Where do you want to mount %s?" msgstr "Aundi bolis carrigai %s?" #: diskdrake/interactive.pm:776 diskdrake/interactive.pm:871 #: fs/partitioning_wizard.pm:129 fs/partitioning_wizard.pm:205 #, c-format msgid "Resizing" msgstr "Arremesuru" #: diskdrake/interactive.pm:776 #, c-format msgid "Computing FAT filesystem bounds" msgstr "Càrculu is làcanas de su filesystem FAT" #: diskdrake/interactive.pm:818 #, c-format msgid "This partition is not resizeable" msgstr "No fait a arremesurai custa pratzidura" #: diskdrake/interactive.pm:823 #, c-format msgid "All data on this partition should be backed up" msgstr "Totu su ki dui est in custa pratzidura iat a bolli sarvau in còpia" #: diskdrake/interactive.pm:825 #, c-format msgid "After resizing partition %s, all data on this partition will be lost" msgstr "" "Apustis de s'arremesuru de sa pratzidura %s, totu su ki dui at du perdis" #: diskdrake/interactive.pm:832 #, c-format msgid "Choose the new size" msgstr "Sçobera sa mesura noa" #: diskdrake/interactive.pm:833 #, c-format msgid "New size in MB: " msgstr "Mesura noa in MB: " #: diskdrake/interactive.pm:834 #, c-format msgid "Minimum size: %s MB" msgstr "" #: diskdrake/interactive.pm:835 #, c-format msgid "Maximum size: %s MB" msgstr "" #: diskdrake/interactive.pm:882 fs/partitioning_wizard.pm:213 #, c-format msgid "" "To ensure data integrity after resizing the partition(s),\n" "filesystem checks will be run on your next boot into Microsoft Windows®" msgstr "" #: diskdrake/interactive.pm:946 diskdrake/interactive.pm:1485 #, c-format msgid "Filesystem encryption key" msgstr "Crai de cuadura de su filesystem" #: diskdrake/interactive.pm:947 #, fuzzy, c-format msgid "Enter your filesystem encryption key" msgstr "Sçobera sa crai de cuadura de su filesystem" #: diskdrake/interactive.pm:948 diskdrake/interactive.pm:1493 #, c-format msgid "Encryption key" msgstr "Crai de cuadura" #: diskdrake/interactive.pm:955 #, c-format msgid "Invalid key" msgstr "" #: diskdrake/interactive.pm:963 #, c-format msgid "Choose an existing RAID to add to" msgstr "Sçobera unu RAID ki jai dui est po d'açungi" #: diskdrake/interactive.pm:965 diskdrake/interactive.pm:984 #, c-format msgid "new" msgstr "nou" #: diskdrake/interactive.pm:982 #, c-format msgid "Choose an existing LVM to add to" msgstr "Sçobera unu LVM ki jai dui est po d'açungi" #: diskdrake/interactive.pm:994 diskdrake/interactive.pm:1003 #, fuzzy, c-format msgid "LVM name" msgstr "Nòmini LVM?" #: diskdrake/interactive.pm:995 #, c-format msgid "Enter a name for the new LVM volume group" msgstr "" #: diskdrake/interactive.pm:1000 #, fuzzy, c-format msgid "\"%s\" already exists" msgstr "Su file esistit jai. A d'impreai?" #: diskdrake/interactive.pm:1031 #, c-format msgid "" "Physical volume %s is still in use.\n" "Do you want to move used physical extents on this volume to other volumes?" msgstr "" #: diskdrake/interactive.pm:1033 #, c-format msgid "Moving physical extents" msgstr "" #: diskdrake/interactive.pm:1051 #, c-format msgid "This partition can not be used for loopback" msgstr "No fait a impreai custa pratzidura po loopback" #: diskdrake/interactive.pm:1064 #, c-format msgid "Loopback" msgstr "Loopback" #: diskdrake/interactive.pm:1065 #, c-format msgid "Loopback file name: " msgstr "Nòmini de su file de loopback:" #: diskdrake/interactive.pm:1070 #, c-format msgid "Give a file name" msgstr "Dona unu nòmini de file" #: diskdrake/interactive.pm:1073 #, c-format msgid "File is already used by another loopback, choose another one" msgstr "Un'atru loopback est jai impreendi su file, sçoberandi un'atru" #: diskdrake/interactive.pm:1074 #, c-format msgid "File already exists. Use it?" msgstr "Su file esistit jai. A d'impreai?" #: diskdrake/interactive.pm:1106 diskdrake/interactive.pm:1109 #, c-format msgid "Mount options" msgstr "Sceras de càrrigu" #: diskdrake/interactive.pm:1116 #, c-format msgid "Various" msgstr "" #: diskdrake/interactive.pm:1162 #, c-format msgid "device" msgstr "trastu" #: diskdrake/interactive.pm:1163 #, c-format msgid "level" msgstr "arrasu" #: diskdrake/interactive.pm:1164 #, c-format msgid "chunk size in KiB" msgstr "" #: diskdrake/interactive.pm:1182 #, c-format msgid "Be careful: this operation is dangerous." msgstr "Atentu: custa cosa est perigulosa." #: diskdrake/interactive.pm:1197 #, fuzzy, c-format msgid "Partitioning Type" msgstr "Pratzimentu" #: diskdrake/interactive.pm:1197 #, c-format msgid "What type of partitioning?" msgstr "Ita tipu de pratzimentu?" #: diskdrake/interactive.pm:1235 #, c-format msgid "You'll need to reboot before the modification can take effect" msgstr "Depis torrai a allui innantis ki sa muda tenjat efetu" #: diskdrake/interactive.pm:1244 #, c-format msgid "Partition table of drive %s is going to be written to disk" msgstr "Megu a scrìiri sa tàula de pratzidura de su trastu %s in su discu" #: diskdrake/interactive.pm:1263 fs/format.pm:102 fs/format.pm:109 #, c-format msgid "Formatting partition %s" msgstr "Formatu sa pratzidura %s" #: diskdrake/interactive.pm:1276 #, c-format msgid "After formatting partition %s, all data on this partition will be lost" msgstr "Apustis formatada sa pratzidura %s, as a perdi totu su ki dui est" #: diskdrake/interactive.pm:1299 #, c-format msgid "Move files to the new partition" msgstr "Movi is file a sa pratzidura noa" #: diskdrake/interactive.pm:1299 #, c-format msgid "Hide files" msgstr "Cua is file" #: diskdrake/interactive.pm:1300 #, c-format msgid "" "Directory %s already contains data\n" "(%s)\n" "\n" "You can either choose to move the files into the partition that will be " "mounted there or leave them where they are (which results in hiding them by " "the contents of the mounted partition)" msgstr "" #: diskdrake/interactive.pm:1315 #, c-format msgid "Moving files to the new partition" msgstr "Movu is file a sa pratzidura noa" #: diskdrake/interactive.pm:1319 #, c-format msgid "Copying %s" msgstr "Còpiu %s" #: diskdrake/interactive.pm:1323 #, c-format msgid "Removing %s" msgstr "Burru %s" #: diskdrake/interactive.pm:1337 #, c-format msgid "partition %s is now known as %s" msgstr "sa pratzidura %s imoi da connosceus po %s" #: diskdrake/interactive.pm:1338 #, c-format msgid "Partitions have been renumbered: " msgstr "Is nùmerus de is pratziduras funt mudaus:" #: diskdrake/interactive.pm:1363 diskdrake/interactive.pm:1434 #, c-format msgid "Device: " msgstr "Trastu: " #: diskdrake/interactive.pm:1364 #, c-format msgid "Volume label: " msgstr "" #: diskdrake/interactive.pm:1365 #, c-format msgid "UUID: " msgstr "" #: diskdrake/interactive.pm:1366 #, c-format msgid "DOS drive letter: %s (just a guess)\n" msgstr "" #: diskdrake/interactive.pm:1370 diskdrake/interactive.pm:1379 #: diskdrake/interactive.pm:1453 #, c-format msgid "Type: " msgstr "Tipu: " #: diskdrake/interactive.pm:1374 diskdrake/interactive.pm:1438 #, c-format msgid "Name: " msgstr "Nòmini: " #: diskdrake/interactive.pm:1381 #, c-format msgid "Start: sector %s\n" msgstr "Cumentzu: segadura %s\n" #: diskdrake/interactive.pm:1382 #, c-format msgid "Size: %s" msgstr "Mesura: %s" #: diskdrake/interactive.pm:1384 #, c-format msgid ", %s sectors" msgstr ", %s segaduras" #: diskdrake/interactive.pm:1386 #, c-format msgid "Cylinder %d to %d\n" msgstr "Cilindru %d finas a %d\n" #: diskdrake/interactive.pm:1387 #, c-format msgid "Number of logical extents: %d\n" msgstr "" #: diskdrake/interactive.pm:1388 #, c-format msgid "Formatted\n" msgstr "Formatau\n" #: diskdrake/interactive.pm:1389 #, c-format msgid "Not formatted\n" msgstr "No formatau\n" #: diskdrake/interactive.pm:1390 #, c-format msgid "Mounted\n" msgstr "Carrigau\n" #: diskdrake/interactive.pm:1391 #, c-format msgid "RAID %s\n" msgstr "RAID %s\n" #: diskdrake/interactive.pm:1393 #, fuzzy, c-format msgid "Encrypted" msgstr "Crai de cuadura" #: diskdrake/interactive.pm:1395 #, c-format msgid " (mapped on %s)" msgstr "" #: diskdrake/interactive.pm:1396 #, c-format msgid " (to map on %s)" msgstr "" #: diskdrake/interactive.pm:1397 #, c-format msgid " (inactive)" msgstr "" #: diskdrake/interactive.pm:1404 #, c-format msgid "" "Loopback file(s):\n" " %s\n" msgstr "" "File (s) de loopback:\n" " %s\n" #: diskdrake/interactive.pm:1405 #, c-format msgid "" "Partition booted by default\n" " (for MS-DOS boot, not for lilo)\n" msgstr "" "Pratzidura alluta de predefiniu\n" " (po allui MS-DOS, no po lilo)\n" #: diskdrake/interactive.pm:1407 #, c-format msgid "Level %s\n" msgstr "Arrasu %s\n" #: diskdrake/interactive.pm:1408 #, c-format msgid "Chunk size %d KiB\n" msgstr "" #: diskdrake/interactive.pm:1409 #, c-format msgid "RAID-disks %s\n" msgstr "Discus RAID %s\n" #: diskdrake/interactive.pm:1411 #, c-format msgid "Loopback file name: %s" msgstr "Nòmini de su file de loopback: %s" #: diskdrake/interactive.pm:1414 #, c-format msgid "" "\n" "Chances are, this partition is\n" "a Driver partition. You should\n" "probably leave it alone.\n" msgstr "" #: diskdrake/interactive.pm:1417 #, c-format msgid "" "\n" "This special Bootstrap\n" "partition is for\n" "dual-booting your system.\n" msgstr "" "\n" "Custa pratzidura spetziali\n" "Bootstrap est po\n" "allui su sistema in dual-boot.\n" #: diskdrake/interactive.pm:1426 #, c-format msgid "Free space on %s (%s)" msgstr "" #: diskdrake/interactive.pm:1435 #, c-format msgid "Read-only" msgstr "Ligi-feti" #: diskdrake/interactive.pm:1436 #, c-format msgid "Size: %s\n" msgstr "Mesura: %s\n" #: diskdrake/interactive.pm:1437 #, c-format msgid "Geometry: %s cylinders, %s heads, %s sectors\n" msgstr "Jometria: %s cilindrus, %s concas, %s segaduras\n" #: diskdrake/interactive.pm:1439 #, fuzzy, c-format msgid "Medium type: " msgstr "Tipu de filesystem: " #: diskdrake/interactive.pm:1440 #, c-format msgid "LVM-disks %s\n" msgstr "Discus LVM %s\n" #: diskdrake/interactive.pm:1441 #, c-format msgid "Partition table type: %s\n" msgstr "Tipu de tàula de is pratziduras: %s\n" #: diskdrake/interactive.pm:1442 #, c-format msgid "on channel %d id %d\n" msgstr "" #: diskdrake/interactive.pm:1486 #, c-format msgid "Choose your filesystem encryption key" msgstr "Sçobera sa crai de cuadura de su filesystem" #: diskdrake/interactive.pm:1489 #, c-format msgid "This encryption key is too simple (must be at least %d characters long)" msgstr "" "Sa crai de cuadura est tropu simpli (bolit longa a su mancu %d caràteris)" #: diskdrake/interactive.pm:1496 #, c-format msgid "Encryption algorithm" msgstr "Algoritmu de critadura" #: diskdrake/removable.pm:46 #, c-format msgid "Change type" msgstr "Muda tipu" #: diskdrake/smbnfs_gtk.pm:81 interactive.pm:129 interactive.pm:550 #: interactive/curses.pm:260 interactive/http.pm:104 interactive/http.pm:160 #: interactive/stdio.pm:39 interactive/stdio.pm:148 mygtk2.pm:847 ugtk2.pm:415 #: ugtk2.pm:517 ugtk2.pm:526 ugtk2.pm:812 #, c-format msgid "Cancel" msgstr "Annudda" #: diskdrake/smbnfs_gtk.pm:164 #, c-format msgid "Cannot login using username %s (bad password?)" msgstr "" #: diskdrake/smbnfs_gtk.pm:168 diskdrake/smbnfs_gtk.pm:177 #, c-format msgid "Domain Authentication Required" msgstr "" #: diskdrake/smbnfs_gtk.pm:169 #, c-format msgid "Which username" msgstr "" #: diskdrake/smbnfs_gtk.pm:169 #, c-format msgid "Another one" msgstr "Unu atru" #: diskdrake/smbnfs_gtk.pm:178 #, c-format msgid "" "Please enter your username, password and domain name to access this host." msgstr "" #: diskdrake/smbnfs_gtk.pm:180 #, c-format msgid "Username" msgstr "Nòmini umperadori" #: diskdrake/smbnfs_gtk.pm:182 #, c-format msgid "Domain" msgstr "Domìniu" #: diskdrake/smbnfs_gtk.pm:206 #, c-format msgid "Search servers" msgstr "Circa is server" #: diskdrake/smbnfs_gtk.pm:211 #, c-format msgid "Search new servers" msgstr "Circa server nous" #: do_pkgs.pm:19 do_pkgs.pm:57 #, c-format msgid "The package %s needs to be installed. Do you want to install it?" msgstr "Bolit aposentau su pakitu %s. Du bolis aposentai?" #: do_pkgs.pm:23 do_pkgs.pm:44 do_pkgs.pm:60 do_pkgs.pm:82 #, c-format msgid "Could not install the %s package!" msgstr "" #: do_pkgs.pm:28 do_pkgs.pm:65 #, c-format msgid "Mandatory package %s is missing" msgstr "Amancat su pakitu %s, necessàriu" #: do_pkgs.pm:39 do_pkgs.pm:77 #, c-format msgid "The following packages need to be installed:\n" msgstr "" #: do_pkgs.pm:241 #, c-format msgid "Installing packages..." msgstr "Aposentu is pakitus..." #: do_pkgs.pm:287 pkgs.pm:285 #, c-format msgid "Removing packages..." msgstr "Srèxinu is pakitus..." #: fs/any.pm:17 #, c-format msgid "" "An error occurred - no valid devices were found on which to create new " "filesystems. Please check your hardware for the cause of this problem" msgstr "" #: fs/any.pm:75 fs/partitioning_wizard.pm:62 #, c-format msgid "You must have a FAT partition mounted in /boot/efi" msgstr "Depis tenni una pratzidura FAT carrigada in /boot/efi" #: fs/format.pm:106 #, c-format msgid "Creating and formatting file %s" msgstr "Creu e formatu su file %s" #: fs/format.pm:125 #, fuzzy, c-format msgid "I do not know how to set label on %s with type %s" msgstr "No sciu comenti formatai %s in tipu %s" #: fs/format.pm:134 #, c-format msgid "setting label on %s failed, is it formatted?" msgstr "" #: fs/format.pm:175 #, c-format msgid "I do not know how to format %s in type %s" msgstr "No sciu comenti formatai %s in tipu %s" #: fs/format.pm:180 fs/format.pm:182 #, c-format msgid "%s formatting of %s failed" msgstr "" #: fs/loopback.pm:24 #, c-format msgid "Circular mounts %s\n" msgstr "" #: fs/mount.pm:85 #, c-format msgid "Mounting partition %s" msgstr "Càrrigu sa pratzidura %s" #: fs/mount.pm:86 #, c-format msgid "mounting partition %s in directory %s failed" msgstr "càrrigu de sa pratzidura %s in sa directory %s faddia" #: fs/mount.pm:91 fs/mount.pm:108 #, c-format msgid "Checking %s" msgstr "Controllu %s" #: fs/mount.pm:125 partition_table.pm:409 #, c-format msgid "error unmounting %s: %s" msgstr "faddina de scàrrigu %s: %s" #: fs/mount.pm:140 #, c-format msgid "Enabling swap partition %s" msgstr "Abivu pratzidura swap %s" #: fs/mount_options.pm:112 #, c-format msgid "Enable Posix Access Control Lists" msgstr "" #: fs/mount_options.pm:114 #, c-format msgid "Flush write cache on file close" msgstr "" #: fs/mount_options.pm:116 #, c-format msgid "Enable group disk quota accounting and optionally enforce limits" msgstr "" #: fs/mount_options.pm:118 #, c-format msgid "" "Do not update inode access times on this filesystem\n" "(e.g, for faster access on the news spool to speed up news servers)." msgstr "" #: fs/mount_options.pm:121 #, c-format msgid "" "Update inode access times on this filesystem in a more efficient way\n" "(e.g, for faster access on the news spool to speed up news servers)." msgstr "" #: fs/mount_options.pm:124 #, c-format msgid "" "Can only be mounted explicitly (i.e.,\n" "the -a option will not cause the filesystem to be mounted)." msgstr "" #: fs/mount_options.pm:127 #, c-format msgid "Do not interpret character or block special devices on the filesystem." msgstr "" #: fs/mount_options.pm:129 #, c-format msgid "" "Do not allow execution of any binaries on the mounted\n" "filesystem. This option might be useful for a server that has filesystems\n" "containing binaries for architectures other than its own." msgstr "" #: fs/mount_options.pm:133 #, c-format msgid "" "Do not allow set-user-identifier or set-group-identifier\n" "bits to take effect. (This seems safe, but is in fact rather unsafe if you\n" "have suidperl(1) installed.)" msgstr "" #: fs/mount_options.pm:137 #, c-format msgid "Mount the filesystem read-only." msgstr "Càrriga su filesystem ligi-feti." #: fs/mount_options.pm:139 #, c-format msgid "All I/O to the filesystem should be done synchronously." msgstr "Totu su I/O po su filesystem iat a bolli fatu in sincronia." #: fs/mount_options.pm:141 #, c-format msgid "Allow every user to mount and umount the filesystem." msgstr "" #: fs/mount_options.pm:143 #, c-format msgid "Allow an ordinary user to mount the filesystem." msgstr "" #: fs/mount_options.pm:145 #, c-format msgid "Enable user disk quota accounting, and optionally enforce limits" msgstr "" #: fs/mount_options.pm:147 #, c-format msgid "Support \"user.\" extended attributes" msgstr "" #: fs/mount_options.pm:149 #, c-format msgid "Give write access to ordinary users" msgstr "Dona permissu de scriidura a umperadoris normalis" #: fs/mount_options.pm:151 #, c-format msgid "Give read-only access to ordinary users" msgstr "Dona a is umperadoris normalis acessu a ligi-feti" #: fs/mount_point.pm:82 #, c-format msgid "Duplicate mount point %s" msgstr "Dòpia su puntu de càrrigu %s" #: fs/mount_point.pm:97 #, c-format msgid "No partition available" msgstr "Nisçuna pratzidura a disposta" #: fs/mount_point.pm:100 #, c-format msgid "Scanning partitions to find mount points" msgstr "Controllu is pratziduras po agatai is puntus de càrrigu" #: fs/mount_point.pm:107 #, c-format msgid "Choose the mount points" msgstr "Sçobera is puntus de càrrigu" #: fs/partitioning.pm:46 #, c-format msgid "Choose the partitions you want to format" msgstr "Sçobera is pratziduras ki bolis formatai" #: fs/partitioning.pm:75 #, c-format msgid "" "Failed to check filesystem %s. Do you want to repair the errors? (beware, " "you can lose data)" msgstr "" #: fs/partitioning.pm:78 #, c-format msgid "Not enough swap space to fulfill installation, please add some" msgstr "" #: fs/partitioning_wizard.pm:53 #, c-format msgid "" "You must have a root partition.\n" "For this, create a partition (or click on an existing one).\n" "Then choose action ``Mount point'' and set it to `/'" msgstr "" "Depis tenni una pratzidura root.\n" "Po custu, crea una pratzidura (o crica in d-una ki jai dui est).\n" "Apustis sçobera s'atzioni ``Puntu de càrrigu'' e assetiaddu a `/'" #: fs/partitioning_wizard.pm:59 #, c-format msgid "" "You do not have a swap partition.\n" "\n" "Continue anyway?" msgstr "" "No tenis una pratzidura de swap.\n" "\n" "Sigu comuncas?" #: fs/partitioning_wizard.pm:93 #, c-format msgid "Use free space" msgstr "Imprea spàtziu lìberu" #: fs/partitioning_wizard.pm:95 #, c-format msgid "Not enough free space to allocate new partitions" msgstr "No dui at spàtziu abasta po ponni pratziduras noas" #: fs/partitioning_wizard.pm:103 #, c-format msgid "Use existing partitions" msgstr "Imprea is pratziduras ki jai dui funt" #: fs/partitioning_wizard.pm:105 #, c-format msgid "There is no existing partition to use" msgstr "No dui at pratzidura de da podi impreai" #: fs/partitioning_wizard.pm:129 #, c-format msgid "Computing the size of the Microsoft Windows® partition" msgstr "Càrculu sa mesura de sa pratzidura Microsoft Windows®" #: fs/partitioning_wizard.pm:165 #, fuzzy, c-format msgid "Use the free space on a Microsoft Windows® partition" msgstr "Imprea su spàtziu lìberu in sa pratzidura Windows" #: fs/partitioning_wizard.pm:169 #, c-format msgid "Which partition do you want to resize?" msgstr "Calli pratzidura bolis arremesurai?" #: fs/partitioning_wizard.pm:172 #, c-format msgid "" "Your Microsoft Windows® partition is too fragmented. Please reboot your " "computer under Microsoft Windows®, run the ``defrag'' utility, then restart " "the Mageia Linux installation." msgstr "" #: fs/partitioning_wizard.pm:180 #, c-format msgid "" "WARNING!\n" "\n" "\n" "Your Microsoft Windows® partition will be now resized.\n" "\n" "\n" "Be careful: this operation is dangerous. If you have not already done so, " "you first need to exit the installation, run \"chkdsk c:\" from a Command " "Prompt under Microsoft Windows® (beware, running graphical program \"scandisk" "\" is not enough, be sure to use \"chkdsk\" in a Command Prompt!), " "optionally run defrag, then restart the installation. You should also backup " "your data.\n" "\n" "\n" "When sure, press %s." msgstr "" #. -PO: keep the double empty lines between sections, this is formatted a la LaTeX #: fs/partitioning_wizard.pm:189 fs/partitioning_wizard.pm:557 #: interactive.pm:549 interactive/curses.pm:263 ugtk2.pm:519 #, c-format msgid "Next" msgstr "Sighi" #: fs/partitioning_wizard.pm:195 #, fuzzy, c-format msgid "Partitionning" msgstr "Pratzimentu" #: fs/partitioning_wizard.pm:195 #, c-format msgid "Which size do you want to keep for Microsoft Windows® on partition %s?" msgstr "" "Ita mesura bolis apoderai po sa pratzidura Microsoft Windows® pratzidura %s?" #: fs/partitioning_wizard.pm:196 #, c-format msgid "Size" msgstr "Mesura" #: fs/partitioning_wizard.pm:205 #, c-format msgid "Resizing Microsoft Windows® partition" msgstr "Arremesuru sa pratzidura Microsoft Windows®" #: fs/partitioning_wizard.pm:210 #, c-format msgid "FAT resizing failed: %s" msgstr "Arremesuradura FAT faddia: %s" #: fs/partitioning_wizard.pm:226 #, c-format msgid "There is no FAT partition to resize (or not enough space left)" msgstr "No dui at pratzidura FAT de arremesurai (no abarrat spàtziu abasta)" #: fs/partitioning_wizard.pm:231 #, c-format msgid "Remove Microsoft Windows®" msgstr "Srèxina Microsoft Windows®" #: fs/partitioning_wizard.pm:231 #, fuzzy, c-format msgid "Erase and use entire disk" msgstr "Burra totu su discu" #: fs/partitioning_wizard.pm:235 #, fuzzy, c-format msgid "" "You have more than one hard disk drive, which one do you want the installer " "to use?" msgstr "Tenis prus de unu discu tostau, cali est ki nci bolis aposentai linux?" #: fs/partitioning_wizard.pm:243 fsedit.pm:632 #, fuzzy, c-format msgid "ALL existing partitions and their data will be lost on drive %s" msgstr "" "Apustis de s'arremesuru de sa pratzidura %s, totu su ki dui at du perdis" #: fs/partitioning_wizard.pm:253 #, c-format msgid "Custom disk partitioning" msgstr "Pratziduramentu discu personalisau" #: fs/partitioning_wizard.pm:259 #, c-format msgid "Use fdisk" msgstr "Imprea fdisk" #: fs/partitioning_wizard.pm:262 #, c-format msgid "" "You can now partition %s.\n" "When you are done, do not forget to save using `w'" msgstr "" #: fs/partitioning_wizard.pm:401 #, fuzzy, c-format msgid "Ext2/3/4" msgstr "Bessi" #: fs/partitioning_wizard.pm:431 fs/partitioning_wizard.pm:577 #, c-format msgid "I can not find any room for installing" msgstr "No potzu agatai spàtziu po s'aposentadura" #: fs/partitioning_wizard.pm:440 fs/partitioning_wizard.pm:584 #, c-format msgid "The DrakX Partitioning wizard found the following solutions:" msgstr "" "Su wizard de pratziduramentu DrakX at agatau is solutzionis ki sighint:" #: fs/partitioning_wizard.pm:510 #, c-format msgid "Here is the content of your disk drive " msgstr "" #: fs/partitioning_wizard.pm:594 #, c-format msgid "Partitioning failed: %s" msgstr "Pratziduramentu faddiu: %s" #: fs/type.pm:393 #, c-format msgid "You can not use JFS for partitions smaller than 16MB" msgstr "No fait a impreai JFS po pratziduras prus piticas de 16MB" #: fs/type.pm:394 #, c-format msgid "You can not use ReiserFS for partitions smaller than 32MB" msgstr "No fait a impreai ReiserFS po pratziduras prus piticas de 32MB" #: fsedit.pm:24 #, c-format msgid "simple" msgstr "simpli" #: fsedit.pm:28 #, c-format msgid "with /usr" msgstr "cun /usr" #: fsedit.pm:33 #, c-format msgid "server" msgstr "server" #: fsedit.pm:137 #, c-format msgid "BIOS software RAID detected on disks %s. Activate it?" msgstr "" #: fsedit.pm:247 #, c-format msgid "" "I can not read the partition table of device %s, it's too corrupted for me :" "(\n" "I can try to go on, erasing over bad partitions (ALL DATA will be lost!).\n" "The other solution is to not allow DrakX to modify the partition table.\n" "(the error is %s)\n" "\n" "Do you agree to lose all the partitions?\n" msgstr "" #: fsedit.pm:427 #, c-format msgid "Mount points must begin with a leading /" msgstr "Is puntus de càrrigu depint cumetzai cun d-una /" #: fsedit.pm:428 #, c-format msgid "Mount points should contain only alphanumerical characters" msgstr "Is puntus de càrrigu iant a bolli de litras e nùmerus feti" #: fsedit.pm:429 #, c-format msgid "There is already a partition with mount point %s\n" msgstr "Dui at jai una pratzidura cun puntu de càrrigu in %s\n" #: fsedit.pm:434 #, c-format msgid "" "You've selected a software RAID partition as root (/).\n" "No bootloader is able to handle this without a /boot partition.\n" "Please be sure to add a separate /boot partition" msgstr "" #: fsedit.pm:440 #, c-format msgid "" "Metadata version unsupported for a boot partition. Please be sure to add a /" "boot partition." msgstr "" #: fsedit.pm:448 #, c-format msgid "" "You've selected a software RAID partition as /boot.\n" "No bootloader is able to handle this." msgstr "" #: fsedit.pm:452 #, c-format msgid "Metadata version unsupported for a boot partition." msgstr "" #: fsedit.pm:459 #, c-format msgid "" "You've selected an encrypted partition as root (/).\n" "No bootloader is able to handle this without a /boot partition.\n" "Please be sure to add a separate /boot partition" msgstr "" #: fsedit.pm:465 fsedit.pm:483 #, c-format msgid "You can not use an encrypted filesystem for mount point %s" msgstr "No fait a impreai unu filesystem cuau po su puntu de càrrigu %s" #: fsedit.pm:469 #, c-format msgid "" "You can not use the LVM Logical Volume for mount point %s since it spans " "physical volumes" msgstr "" #: fsedit.pm:471 #, c-format msgid "" "You've selected the LVM Logical Volume as root (/).\n" "The bootloader is not able to handle this when the volume spans physical " "volumes.\n" "You should create a separate /boot partition first" msgstr "" #: fsedit.pm:475 fsedit.pm:477 #, c-format msgid "This directory should remain within the root filesystem" msgstr "Custa directory iat a bolli lassada in su filesystem root" #: fsedit.pm:479 fsedit.pm:481 #, c-format msgid "" "You need a true filesystem (ext2/3/4, reiserfs, xfs, or jfs) for this mount " "point\n" msgstr "" "Ti serbit unu filesystem beru (ext2/3/4, reiserfs, xfs, or jfs) po custu " "puntu de càrrigu\n" #: fsedit.pm:548 #, c-format msgid "Not enough free space for auto-allocating" msgstr "No dui at spàtziu abasta po sa aposentadura automàtiga" #: fsedit.pm:550 #, c-format msgid "Nothing to do" msgstr "Nudda de fai" #: harddrake/data.pm:62 #, c-format msgid "SATA controllers" msgstr "Controlladoris SATA" #: harddrake/data.pm:71 #, c-format msgid "RAID controllers" msgstr "Controlladoris RAID" #: harddrake/data.pm:81 #, c-format msgid "(E)IDE/ATA controllers" msgstr "Controlladoris (E)IDE/ATA" #: harddrake/data.pm:92 #, fuzzy, c-format msgid "Card readers" msgstr "Modellu de sa skeda:" #: harddrake/data.pm:101 #, c-format msgid "Firewire controllers" msgstr "Controlladoris Firewire" #: harddrake/data.pm:110 #, c-format msgid "PCMCIA controllers" msgstr "Controlladoris PCMCIA" #: harddrake/data.pm:119 #, c-format msgid "SCSI controllers" msgstr "Controlladoris SCSI" #: harddrake/data.pm:128 #, c-format msgid "USB controllers" msgstr "Controlladoris USB" #: harddrake/data.pm:137 #, c-format msgid "USB ports" msgstr "Portas USB" #: harddrake/data.pm:146 #, c-format msgid "SMBus controllers" msgstr "Controlladoris SMBus" #: harddrake/data.pm:155 #, c-format msgid "Bridges and system controllers" msgstr "Pontis e controlladoris de sistema" #: harddrake/data.pm:167 #, c-format msgid "Floppy" msgstr "Floppy" #: harddrake/data.pm:177 #, c-format msgid "Zip" msgstr "Zip" #: harddrake/data.pm:193 #, c-format msgid "Hard Disk" msgstr "Hard Disk" #: harddrake/data.pm:203 #, fuzzy, c-format msgid "USB Mass Storage Devices" msgstr "Trastus USB po su sonu" #: harddrake/data.pm:212 #, c-format msgid "CDROM" msgstr "CDROM" #: harddrake/data.pm:222 #, c-format msgid "CD/DVD burners" msgstr "Scriidoris CD/DVD" #: harddrake/data.pm:232 #, c-format msgid "DVD-ROM" msgstr "DVD-ROM" #: harddrake/data.pm:242 #, c-format msgid "Tape" msgstr "Tape" #: harddrake/data.pm:253 #, c-format msgid "AGP controllers" msgstr "Controlladoris AGP" #: harddrake/data.pm:262 #, c-format msgid "Videocard" msgstr "Skeda Vìdeo" #: harddrake/data.pm:271 #, c-format msgid "DVB card" msgstr "Skeda DVB" #: harddrake/data.pm:279 #, c-format msgid "Tvcard" msgstr "Skeda TV" #: harddrake/data.pm:289 #, c-format msgid "Other MultiMedia devices" msgstr "Atrus trastus multimedia" #: harddrake/data.pm:298 #, c-format msgid "Soundcard" msgstr "Skeda de sonu" #: harddrake/data.pm:312 #, c-format msgid "Webcam" msgstr "Webcam" #: harddrake/data.pm:327 #, c-format msgid "Processors" msgstr "Processoris" #: harddrake/data.pm:337 #, c-format msgid "ISDN adapters" msgstr "Adatadoris ISDN" #: harddrake/data.pm:348 #, c-format msgid "USB sound devices" msgstr "Trastus USB po su sonu" #: harddrake/data.pm:357 #, c-format msgid "Radio cards" msgstr "Skedas arràdiu" #: harddrake/data.pm:366 #, c-format msgid "ATM network cards" msgstr "Skedas de arretza ATM" #: harddrake/data.pm:375 #, c-format msgid "WAN network cards" msgstr "Skedas de arretza WAN" #: harddrake/data.pm:384 #, c-format msgid "Bluetooth devices" msgstr "Trastus Bluetooth" #: harddrake/data.pm:393 #, c-format msgid "Ethernetcard" msgstr "Skeda Ethernet" #: harddrake/data.pm:410 #, c-format msgid "Modem" msgstr "Modem" #: harddrake/data.pm:420 #, c-format msgid "ADSL adapters" msgstr "Adatadoris ADSL" #: harddrake/data.pm:432 #, c-format msgid "Memory" msgstr "Memòria" #: harddrake/data.pm:441 #, c-format msgid "Printer" msgstr "Imprentadora" #. -PO: these are joysticks controllers: #: harddrake/data.pm:455 #, c-format msgid "Game port controllers" msgstr "Controlladoris de sa Porta de Jogu" #: harddrake/data.pm:464 #, c-format msgid "Joystick" msgstr "Joystick" #: harddrake/data.pm:474 #, c-format msgid "Keyboard" msgstr "Tecrau" #: harddrake/data.pm:488 #, c-format msgid "Tablet and touchscreen" msgstr "Tablet e touchscreen" #: harddrake/data.pm:497 #, c-format msgid "Mouse" msgstr "Sòrixi" #: harddrake/data.pm:512 #, c-format msgid "Biometry" msgstr "" #: harddrake/data.pm:520 #, c-format msgid "UPS" msgstr "UPS" #: harddrake/data.pm:529 #, c-format msgid "Scanner" msgstr "Scannidora" #: harddrake/data.pm:540 #, c-format msgid "Unknown/Others" msgstr "Disconnotu/Atrus" #: harddrake/data.pm:570 #, c-format msgid "cpu # " msgstr "cpu # " #: harddrake/sound.pm:303 #, c-format msgid "Please Wait... Applying the configuration" msgstr "Abeta... Àprigu s'assètiu" #: harddrake/sound.pm:366 #, c-format msgid "Enable PulseAudio" msgstr "" #: harddrake/sound.pm:370 #, c-format msgid "Enable 5.1 sound with Pulse Audio" msgstr "" #: harddrake/sound.pm:375 #, c-format msgid "Enable user switching for audio applications" msgstr "" #: harddrake/sound.pm:379 #, c-format msgid "Use Glitch-Free mode" msgstr "" #: harddrake/sound.pm:385 #, c-format msgid "Reset sound mixer to default values" msgstr "" #: harddrake/sound.pm:390 #, c-format msgid "Trouble shooting" msgstr "" #: harddrake/sound.pm:397 #, c-format msgid "No alternative driver" msgstr "" #: harddrake/sound.pm:398 #, c-format msgid "" "There's no known OSS/ALSA alternative driver for your sound card (%s) which " "currently uses \"%s\"" msgstr "" #: harddrake/sound.pm:405 #, c-format msgid "Sound configuration" msgstr "Assètiu de su Sonu" #: harddrake/sound.pm:407 #, c-format msgid "" "Here you can select an alternative driver (either OSS or ALSA) for your " "sound card (%s)." msgstr "" #. -PO: here the first %s is either "OSS" or "ALSA", #. -PO: the second %s is the name of the current driver #. -PO: and the third %s is the name of the default driver #: harddrake/sound.pm:412 #, c-format msgid "" "\n" "\n" "Your card currently uses the %s\"%s\" driver (the default driver for your " "card is \"%s\")" msgstr "" #: harddrake/sound.pm:414 #, c-format msgid "" "OSS (Open Sound System) was the first sound API. It's an OS independent " "sound API (it's available on most UNIX(tm) systems) but it's a very basic " "and limited API.\n" "What's more, OSS drivers all reinvent the wheel.\n" "\n" "ALSA (Advanced Linux Sound Architecture) is a modularized architecture " "which\n" "supports quite a large range of ISA, USB and PCI cards.\n" "\n" "It also provides a much higher API than OSS.\n" "\n" "To use alsa, one can either use:\n" "- the old compatibility OSS api\n" "- the new ALSA api that provides many enhanced features but requires using " "the ALSA library.\n" msgstr "" #: harddrake/sound.pm:428 harddrake/sound.pm:511 #, c-format msgid "Driver:" msgstr "Driver:" #: harddrake/sound.pm:442 #, c-format msgid "" "The old \"%s\" driver is blacklisted.\n" "\n" "It has been reported to oops the kernel on unloading.\n" "\n" "The new \"%s\" driver will only be used on next bootstrap." msgstr "" #: harddrake/sound.pm:450 #, c-format msgid "No open source driver" msgstr "Nisçunu driver open source" #: harddrake/sound.pm:451 #, c-format msgid "" "There's no free driver for your sound card (%s), but there's a proprietary " "driver at \"%s\"." msgstr "" "No dui est unu driver lìberu po sa skeda àudio (%s), ma nci nd'at unu " "propiedàriu in \"%s\"." #: harddrake/sound.pm:454 #, c-format msgid "No known driver" msgstr "Nisçunu driver connotu" #: harddrake/sound.pm:455 #, c-format msgid "There's no known driver for your sound card (%s)" msgstr "No connosçu driver po sa skeda àudio (%s)" #: harddrake/sound.pm:470 #, c-format msgid "Sound trouble shooting" msgstr "" #. -PO: keep the double empty lines between sections, this is formatted a la LaTeX #: harddrake/sound.pm:473 #, c-format msgid "" "The classic bug sound tester is to run the following commands:\n" "\n" "\n" "- \"lspcidrake -v | fgrep -i AUDIO\" will tell you which driver your card " "uses\n" "by default\n" "\n" "- \"grep sound-slot /etc/modprobe.conf\" will tell you what driver it\n" "currently uses\n" "\n" "- \"/sbin/lsmod\" will enable you to check if its module (driver) is\n" "loaded or not\n" "\n" "- \"/sbin/chkconfig --list sound\" and \"/sbin/chkconfig --list alsa\" will\n" "tell you if sound and alsa services are configured to be run on\n" "initlevel 3\n" "\n" "- \"aumix -q\" will tell you if the sound volume is muted or not\n" "\n" "- \"/sbin/fuser -v /dev/dsp\" will tell which program uses the sound card.\n" msgstr "" #: harddrake/sound.pm:500 #, c-format msgid "Let me pick any driver" msgstr "" #: harddrake/sound.pm:503 #, c-format msgid "Choosing an arbitrary driver" msgstr "" #. -PO: keep the double empty lines between sections, this is formatted a la LaTeX #: harddrake/sound.pm:506 #, c-format msgid "" "If you really think that you know which driver is the right one for your " "card\n" "you can pick one in the above list.\n" "\n" "The current driver for your \"%s\" sound card is \"%s\" " msgstr "" #: harddrake/v4l.pm:12 #, c-format msgid "Auto-detect" msgstr "" #: harddrake/v4l.pm:97 harddrake/v4l.pm:285 harddrake/v4l.pm:337 #, c-format msgid "Unknown|Generic" msgstr "Disconnotu|Genèrigu" #: harddrake/v4l.pm:130 #, c-format msgid "Unknown|CPH05X (bt878) [many vendors]" msgstr "Disconnotu|CPH05X (bt878) [meda produsidoris]" #: harddrake/v4l.pm:131 #, c-format msgid "Unknown|CPH06X (bt878) [many vendors]" msgstr "Disconnotu[CPH06X (bt878) [meda produsidoris]" #: harddrake/v4l.pm:475 #, c-format msgid "" "For most modern TV cards, the bttv module of the GNU/Linux kernel just auto-" "detect the rights parameters.\n" "If your card is misdetected, you can force the right tuner and card types " "here. Just select your tv card parameters if needed." msgstr "" "Po su prus de is skedas TV de oi, su mòdulu bttv de su kernel GNU/Linux " "connoscit a solu is paràmetrus justus.\n" "Ki no connoscit beni sa skeda, podis fortzai innoi is tipus de tuner e " "skeda. Ki serbit, sçobera is paràmetrus de sa skeda tv." #: harddrake/v4l.pm:478 #, c-format msgid "Card model:" msgstr "Modellu de sa skeda:" #: harddrake/v4l.pm:479 #, c-format msgid "Tuner type:" msgstr "Tipu de sintonisadori:" #: interactive.pm:128 interactive.pm:549 interactive/curses.pm:263 #: interactive/http.pm:103 interactive/http.pm:156 interactive/stdio.pm:39 #: interactive/stdio.pm:148 interactive/stdio.pm:149 mygtk2.pm:847 #: ugtk2.pm:421 ugtk2.pm:519 ugtk2.pm:812 ugtk2.pm:835 #, c-format msgid "Ok" msgstr "Ok" #: interactive.pm:228 modules/interactive.pm:72 ugtk2.pm:811 wizards.pm:156 #, c-format msgid "Yes" msgstr "Eya" #: interactive.pm:228 modules/interactive.pm:72 ugtk2.pm:811 wizards.pm:156 #, c-format msgid "No" msgstr "No" #: interactive.pm:262 #, c-format msgid "Choose a file" msgstr "Sçobera unu file" #: interactive.pm:387 interactive/gtk.pm:453 #, c-format msgid "Add" msgstr "Açungi" #: interactive.pm:387 interactive/gtk.pm:453 #, c-format msgid "Modify" msgstr "Muda" #: interactive.pm:549 interactive/curses.pm:263 ugtk2.pm:519 #, c-format msgid "Finish" msgstr "Acaba" #: interactive.pm:550 interactive/curses.pm:260 ugtk2.pm:517 #, c-format msgid "Previous" msgstr "Agoa" #: interactive/curses.pm:556 ugtk2.pm:872 #, c-format msgid "No file chosen" msgstr "Nisçunu file sçoberau" #: interactive/curses.pm:560 ugtk2.pm:876 #, c-format msgid "You have chosen a directory, not a file" msgstr "As sçoberau una directory, no unu file" #: interactive/curses.pm:562 ugtk2.pm:878 #, c-format msgid "No such directory" msgstr "Nisçuna directory de aici" #: interactive/curses.pm:562 ugtk2.pm:878 #, c-format msgid "No such file" msgstr "Nisçunu file de aici" #: interactive/gtk.pm:594 #, c-format msgid "Beware, Caps Lock is enabled" msgstr "" #: interactive/stdio.pm:29 interactive/stdio.pm:154 #, c-format msgid "Bad choice, try again\n" msgstr "Sçoberu malu, torra a provai\n" #: interactive/stdio.pm:30 interactive/stdio.pm:155 #, c-format msgid "Your choice? (default %s) " msgstr "Ita sçoberas? (predefiniu %s)" #: interactive/stdio.pm:54 #, c-format msgid "" "Entries you'll have to fill:\n" "%s" msgstr "" "Boxis ki depis preni:\n" "%s" #: interactive/stdio.pm:70 #, c-format msgid "Your choice? (0/1, default `%s') " msgstr "Ita sçoberas? (0/1, predefiniu `%s') " #: interactive/stdio.pm:97 #, c-format msgid "Button `%s': %s" msgstr "Butoni `%s': %s" #: interactive/stdio.pm:98 #, c-format msgid "Do you want to click on this button?" msgstr "Bolis cricai custu butoni?" #: interactive/stdio.pm:110 #, c-format msgid "Your choice? (default `%s'%s) " msgstr "Ita sçoberas? (predefiniu `%s'%s)" #: interactive/stdio.pm:110 #, c-format msgid " enter `void' for void entry" msgstr "" #: interactive/stdio.pm:128 #, c-format msgid "=> There are many things to choose from (%s).\n" msgstr "" #: interactive/stdio.pm:131 #, c-format msgid "" "Please choose the first number of the 10-range you wish to edit,\n" "or just hit Enter to proceed.\n" "Your choice? " msgstr "" #: interactive/stdio.pm:144 #, c-format msgid "" "=> Notice, a label changed:\n" "%s" msgstr "" #: interactive/stdio.pm:151 #, c-format msgid "Re-submit" msgstr "" #. -PO: the string "default:LTR" can be translated *ONLY* as "default:LTR" #. -PO: or as "default:RTL", depending if your language is written from #. -PO: left to right, or from right to left; any other string is wrong. #: lang.pm:203 #, c-format msgid "default:LTR" msgstr "predefiniu:LTR" #: lang.pm:220 #, c-format msgid "Andorra" msgstr "Andorra" #: lang.pm:221 timezone.pm:226 #, c-format msgid "United Arab Emirates" msgstr "Emiraus Aràbius Unius" #: lang.pm:222 #, c-format msgid "Afghanistan" msgstr "Afganistàn" #: lang.pm:223 #, c-format msgid "Antigua and Barbuda" msgstr "Antìgua e Barbuda" #: lang.pm:224 #, c-format msgid "Anguilla" msgstr "Anguilla" #: lang.pm:225 #, c-format msgid "Albania" msgstr "Albania" #: lang.pm:226 #, c-format msgid "Armenia" msgstr "Armènia" #: lang.pm:227 #, c-format msgid "Netherlands Antilles" msgstr "Antillas Olandesas" #: lang.pm:228 #, c-format msgid "Angola" msgstr "Angola" #: lang.pm:229 #, c-format msgid "Antarctica" msgstr "Antàrtiga" #: lang.pm:230 timezone.pm:271 #, c-format msgid "Argentina" msgstr "Argentina" #: lang.pm:231 #, c-format msgid "American Samoa" msgstr "Samoa Americana" #: lang.pm:232 mirror.pm:12 timezone.pm:229 #, c-format msgid "Austria" msgstr "Àustria" #: lang.pm:233 mirror.pm:11 timezone.pm:267 #, c-format msgid "Australia" msgstr "Austràlia" #: lang.pm:234 #, c-format msgid "Aruba" msgstr "Aruba" #: lang.pm:235 #, c-format msgid "Azerbaijan" msgstr "Azerbaijàn" #: lang.pm:236 #, c-format msgid "Bosnia and Herzegovina" msgstr "Bòsnia e Erzegòvina" #: lang.pm:237 #, c-format msgid "Barbados" msgstr "Barbados" #: lang.pm:238 timezone.pm:211 #, c-format msgid "Bangladesh" msgstr "Bangladesh" #: lang.pm:239 mirror.pm:13 timezone.pm:231 #, c-format msgid "Belgium" msgstr "Belju" #: lang.pm:240 #, c-format msgid "Burkina Faso" msgstr "Burkina Faso" #: lang.pm:241 timezone.pm:232 #, c-format msgid "Bulgaria" msgstr "Bulgaria" #: lang.pm:242 #, c-format msgid "Bahrain" msgstr "Bahrain" #: lang.pm:243 #, c-format msgid "Burundi" msgstr "Burundi" #: lang.pm:244 #, c-format msgid "Benin" msgstr "Benin" #: lang.pm:245 #, c-format msgid "Bermuda" msgstr "Bermuda" #: lang.pm:246 #, c-format msgid "Brunei Darussalam" msgstr "Brunei Darussalam" #: lang.pm:247 #, c-format msgid "Bolivia" msgstr "Bolìvia" #: lang.pm:248 mirror.pm:14 timezone.pm:272 #, c-format msgid "Brazil" msgstr "Brasili" #: lang.pm:249 #, c-format msgid "Bahamas" msgstr "Bahamas" #: lang.pm:250 #, c-format msgid "Bhutan" msgstr "Bhutan" #: lang.pm:251 #, c-format msgid "Bouvet Island" msgstr "Ìsula Bouvet" #: lang.pm:252 #, c-format msgid "Botswana" msgstr "Botswana" #: lang.pm:253 timezone.pm:230 #, c-format msgid "Belarus" msgstr "Bielorùssia" #: lang.pm:254 #, c-format msgid "Belize" msgstr "Belize" #: lang.pm:255 mirror.pm:15 timezone.pm:261 #, c-format msgid "Canada" msgstr "Cànada" #: lang.pm:256 #, c-format msgid "Cocos (Keeling) Islands" msgstr "Ìsulas Cocos (Keeling)" #: lang.pm:257 #, c-format msgid "Congo (Kinshasa)" msgstr "Congo (Kinshasa)" #: lang.pm:258 #, c-format msgid "Central African Republic" msgstr "Repùbrica de Centru Àfriga" #: lang.pm:259 #, c-format msgid "Congo (Brazzaville)" msgstr "Congo (Brazzaville)" #: lang.pm:260 mirror.pm:39 timezone.pm:255 #, c-format msgid "Switzerland" msgstr "Svìtzera" #: lang.pm:261 #, c-format msgid "Cote d'Ivoire" msgstr "Cote d'Ivoire" #: lang.pm:262 #, c-format msgid "Cook Islands" msgstr "Ìsulas Cook" #: lang.pm:263 timezone.pm:273 #, c-format msgid "Chile" msgstr "Cili" #: lang.pm:264 #, c-format msgid "Cameroon" msgstr "Càmerun" #: lang.pm:265 timezone.pm:212 #, c-format msgid "China" msgstr "Cina" #: lang.pm:266 #, c-format msgid "Colombia" msgstr "Colòmbia" #: lang.pm:267 mirror.pm:16 #, c-format msgid "Costa Rica" msgstr "Costa Rica" #: lang.pm:268 #, c-format msgid "Serbia & Montenegro" msgstr "Serbia & Montenegro" #: lang.pm:269 #, c-format msgid "Cuba" msgstr "Cuba" #: lang.pm:270 #, c-format msgid "Cape Verde" msgstr "Cabu Birdi" #: lang.pm:271 #, c-format msgid "Christmas Island" msgstr "Ìsula Christmas" #: lang.pm:272 #, c-format msgid "Cyprus" msgstr "Cipru" #: lang.pm:273 mirror.pm:17 timezone.pm:233 #, c-format msgid "Czech Republic" msgstr "Arrepùbriga Ceca" #: lang.pm:274 mirror.pm:22 timezone.pm:238 #, c-format msgid "Germany" msgstr "Germània" #: lang.pm:275 #, c-format msgid "Djibouti" msgstr "Gibuti" #: lang.pm:276 mirror.pm:18 timezone.pm:234 #, c-format msgid "Denmark" msgstr "Danimarca" #: lang.pm:277 #, c-format msgid "Dominica" msgstr "Dominica" #: lang.pm:278 #, c-format msgid "Dominican Republic" msgstr "Repùbriga Dominigana" #: lang.pm:279 #, c-format msgid "Algeria" msgstr "Algeria" #: lang.pm:280 #, c-format msgid "Ecuador" msgstr "Ecuadòr" #: lang.pm:281 mirror.pm:19 timezone.pm:235 #, c-format msgid "Estonia" msgstr "Estònia" #: lang.pm:282 #, c-format msgid "Egypt" msgstr "Egitu" #: lang.pm:283 #, c-format msgid "Western Sahara" msgstr "Sahara" #: lang.pm:284 #, c-format msgid "Eritrea" msgstr "Eritrea" #: lang.pm:285 mirror.pm:37 timezone.pm:253 #, c-format msgid "Spain" msgstr "Spannya" #: lang.pm:286 #, c-format msgid "Ethiopia" msgstr "Etiòpia" #: lang.pm:287 mirror.pm:20 timezone.pm:236 #, c-format msgid "Finland" msgstr "Finlàndia" #: lang.pm:288 #, c-format msgid "Fiji" msgstr "Figi" #: lang.pm:289 #, c-format msgid "Falkland Islands (Malvinas)" msgstr "Falkland Islands (Malvinas)" #: lang.pm:290 #, c-format msgid "Micronesia" msgstr "Micronèsia" #: lang.pm:291 #, c-format msgid "Faroe Islands" msgstr "Ìsulas Faeroer" #: lang.pm:292 mirror.pm:21 timezone.pm:237 #, c-format msgid "France" msgstr "França" #: lang.pm:293 #, c-format msgid "Gabon" msgstr "Gabòn" #: lang.pm:294 timezone.pm:257 #, c-format msgid "United Kingdom" msgstr "Arrennu Uniu" #: lang.pm:295 #, c-format msgid "Grenada" msgstr "Grenada" #: lang.pm:296 #, c-format msgid "Georgia" msgstr "Georja" #: lang.pm:297 #, c-format msgid "French Guiana" msgstr "Guyana Frantzesa" #: lang.pm:298 #, c-format msgid "Ghana" msgstr "Ghana" #: lang.pm:299 #, c-format msgid "Gibraltar" msgstr "Gibilterra" #: lang.pm:300 #, c-format msgid "Greenland" msgstr "Groenlàndia" #: lang.pm:301 #, c-format msgid "Gambia" msgstr "Gàmbia" #: lang.pm:302 #, c-format msgid "Guinea" msgstr "Ghinea" #: lang.pm:303 #, c-format msgid "Guadeloupe" msgstr "Guadeloupe" #: lang.pm:304 #, c-format msgid "Equatorial Guinea" msgstr "Ghinea Ecuadoriali" #: lang.pm:305 mirror.pm:23 timezone.pm:239 #, c-format msgid "Greece" msgstr "Grexa" #: lang.pm:306 #, c-format msgid "South Georgia and the South Sandwich Islands" msgstr "South Georgia and the South Sandwich Islands" #: lang.pm:307 timezone.pm:262 #, c-format msgid "Guatemala" msgstr "Guatemala" #: lang.pm:308 #, c-format msgid "Guam" msgstr "Guam" #: lang.pm:309 #, c-format msgid "Guinea-Bissau" msgstr "Guinea-Bissau" #: lang.pm:310 #, c-format msgid "Guyana" msgstr "Guyana" #: lang.pm:311 #, c-format msgid "Hong Kong SAR (China)" msgstr "Hong Kong SAR (Cina)" #: lang.pm:312 #, c-format msgid "Heard and McDonald Islands" msgstr "Ìsulas Heard e McDonald" #: lang.pm:313 #, c-format msgid "Honduras" msgstr "Honduras" #: lang.pm:314 #, c-format msgid "Croatia" msgstr "Croàtzia" #: lang.pm:315 #, c-format msgid "Haiti" msgstr "Haiti" #: lang.pm:316 mirror.pm:24 timezone.pm:240 #, c-format msgid "Hungary" msgstr "Ungheria" #: lang.pm:317 timezone.pm:215 #, c-format msgid "Indonesia" msgstr "Indonèsia" #: lang.pm:318 mirror.pm:25 timezone.pm:241 #, c-format msgid "Ireland" msgstr "Irlanda" #: lang.pm:319 mirror.pm:26 timezone.pm:217 #, c-format msgid "Israel" msgstr "Israeli" #: lang.pm:320 timezone.pm:214 #, c-format msgid "India" msgstr "Ìndia" #: lang.pm:321 #, c-format msgid "British Indian Ocean Territory" msgstr "British Indian Ocean Territory" #: lang.pm:322 #, c-format msgid "Iraq" msgstr "Iràq" #: lang.pm:323 timezone.pm:216 #, c-format msgid "Iran" msgstr "Iràn" #: lang.pm:324 #, c-format msgid "Iceland" msgstr "Islanda" #: lang.pm:325 mirror.pm:27 timezone.pm:242 #, c-format msgid "Italy" msgstr "Itàlia" #: lang.pm:326 #, c-format msgid "Jamaica" msgstr "Jamaica" #: lang.pm:327 #, c-format msgid "Jordan" msgstr "Jordània" #: lang.pm:328 mirror.pm:28 timezone.pm:218 #, c-format msgid "Japan" msgstr "Japoni" #: lang.pm:329 #, c-format msgid "Kenya" msgstr "Kènia" #: lang.pm:330 #, c-format msgid "Kyrgyzstan" msgstr "Kirghìsistan" #: lang.pm:331 #, c-format msgid "Cambodia" msgstr "Camboja" #: lang.pm:332 #, c-format msgid "Kiribati" msgstr "Kiribati" #: lang.pm:333 #, c-format msgid "Comoros" msgstr "Comorras" #: lang.pm:334 #, c-format msgid "Saint Kitts and Nevis" msgstr "Saint Kitts and Nevis" #: lang.pm:335 #, c-format msgid "Korea (North)" msgstr "Korea (Nord)" #: lang.pm:336 timezone.pm:219 #, c-format msgid "Korea" msgstr "Korea" #: lang.pm:337 #, c-format msgid "Kuwait" msgstr "Kuwait" #: lang.pm:338 #, c-format msgid "Cayman Islands" msgstr "Ìsulas Cayman" #: lang.pm:339 #, c-format msgid "Kazakhstan" msgstr "Kazakhstan" #: lang.pm:340 #, c-format msgid "Laos" msgstr "Laos" #: lang.pm:341 #, c-format msgid "Lebanon" msgstr "Lìbanu" #: lang.pm:342 #, c-format msgid "Saint Lucia" msgstr "Santa Luxia" #: lang.pm:343 #, c-format msgid "Liechtenstein" msgstr "Liechtenstein" #: lang.pm:344 #, c-format msgid "Sri Lanka" msgstr "Sri Lanka" #: lang.pm:345 #, c-format msgid "Liberia" msgstr "Libèria" #: lang.pm:346 #, c-format msgid "Lesotho" msgstr "Lesotho" #: lang.pm:347 timezone.pm:243 #, c-format msgid "Lithuania" msgstr "Lituània" #: lang.pm:348 timezone.pm:244 #, c-format msgid "Luxembourg" msgstr "Lussemburgu" #: lang.pm:349 #, c-format msgid "Latvia" msgstr "Letònia" #: lang.pm:350 #, c-format msgid "Libya" msgstr "Lìbia" #: lang.pm:351 #, c-format msgid "Morocco" msgstr "Marrocu" #: lang.pm:352 #, c-format msgid "Monaco" msgstr "Monaco" #: lang.pm:353 #, c-format msgid "Moldova" msgstr "Moldova" #: lang.pm:354 #, c-format msgid "Madagascar" msgstr "Madagascàr" #: lang.pm:355 #, c-format msgid "Marshall Islands" msgstr "Ìsulas Marshall" #: lang.pm:356 #, c-format msgid "Macedonia" msgstr "Macedònia" #: lang.pm:357 #, c-format msgid "Mali" msgstr "Mali" #: lang.pm:358 #, c-format msgid "Myanmar" msgstr "Birmània" #: lang.pm:359 #, c-format msgid "Mongolia" msgstr "Mongòlia" #: lang.pm:360 #, c-format msgid "Northern Mariana Islands" msgstr "Ìsulas Nord Mariannas" #: lang.pm:361 #, c-format msgid "Martinique" msgstr "Martinique" #: lang.pm:362 #, c-format msgid "Mauritania" msgstr "Mauritània" #: lang.pm:363 #, c-format msgid "Montserrat" msgstr "Montserrat" #: lang.pm:364 #, c-format msgid "Malta" msgstr "Malta" #: lang.pm:365 #, c-format msgid "Mauritius" msgstr "Maurìtziu" #: lang.pm:366 #, c-format msgid "Maldives" msgstr "Maldivas" #: lang.pm:367 #, c-format msgid "Malawi" msgstr "Malawi" #: lang.pm:368 timezone.pm:263 #, c-format msgid "Mexico" msgstr "Mèssigu" #: lang.pm:369 timezone.pm:220 #, c-format msgid "Malaysia" msgstr "Malèsia" #: lang.pm:370 #, c-format msgid "Mozambique" msgstr "Mosambicu" #: lang.pm:371 #, c-format msgid "Namibia" msgstr "Namìbia" #: lang.pm:372 #, c-format msgid "New Caledonia" msgstr "Caledònia Noa" #: lang.pm:373 #, c-format msgid "Niger" msgstr "Niger" #: lang.pm:374 #, c-format msgid "Norfolk Island" msgstr "Ìsula Norfolk" #: lang.pm:375 #, c-format msgid "Nigeria" msgstr "Nigèria" #: lang.pm:376 #, c-format msgid "Nicaragua" msgstr "Nicaràgua" #: lang.pm:377 mirror.pm:29 timezone.pm:245 #, c-format msgid "Netherlands" msgstr "Olanda" #: lang.pm:378 mirror.pm:31 timezone.pm:246 #, c-format msgid "Norway" msgstr "Norvexa" #: lang.pm:379 #, c-format msgid "Nepal" msgstr "Nepal" #: lang.pm:380 #, c-format msgid "Nauru" msgstr "Nauru" #: lang.pm:381 #, c-format msgid "Niue" msgstr "Niue" #: lang.pm:382 mirror.pm:30 timezone.pm:268 #, c-format msgid "New Zealand" msgstr "Zelanda Noa" #: lang.pm:383 #, c-format msgid "Oman" msgstr "Oman" #: lang.pm:384 #, c-format msgid "Panama" msgstr "Pànama" #: lang.pm:385 #, c-format msgid "Peru" msgstr "Perù" #: lang.pm:386 #, c-format msgid "French Polynesia" msgstr "Polinèsia Frantzesa" #: lang.pm:387 #, c-format msgid "Papua New Guinea" msgstr "Pàpua Ghinea Noa" #: lang.pm:388 timezone.pm:221 #, c-format msgid "Philippines" msgstr "Filipinas" #: lang.pm:389 #, c-format msgid "Pakistan" msgstr "Pakistàn" #: lang.pm:390 mirror.pm:32 timezone.pm:247 #, c-format msgid "Poland" msgstr "Polònia" #: lang.pm:391 #, c-format msgid "Saint Pierre and Miquelon" msgstr "Saint Pierre e Miquelon" #: lang.pm:392 #, c-format msgid "Pitcairn" msgstr "Pitcairn" #: lang.pm:393 #, c-format msgid "Puerto Rico" msgstr "Puerto Rico" #: lang.pm:394 #, c-format msgid "Palestine" msgstr "Palestina" #: lang.pm:395 mirror.pm:33 timezone.pm:248 #, c-format msgid "Portugal" msgstr "Portugallu" #: lang.pm:396 #, c-format msgid "Paraguay" msgstr "Paraguay" #: lang.pm:397 #, c-format msgid "Palau" msgstr "Palau" #: lang.pm:398 #, c-format msgid "Qatar" msgstr "Qatar" #: lang.pm:399 #, c-format msgid "Reunion" msgstr "Reunion" #: lang.pm:400 timezone.pm:249 #, c-format msgid "Romania" msgstr "Romania" #: lang.pm:401 mirror.pm:34 #, c-format msgid "Russia" msgstr "Rùssia" #: lang.pm:402 #, c-format msgid "Rwanda" msgstr "Ruanda" #: lang.pm:403 #, c-format msgid "Saudi Arabia" msgstr "Aràbia Saudia" #: lang.pm:404 #, c-format msgid "Solomon Islands" msgstr "Ìsulas Salomoni" #: lang.pm:405 #, c-format msgid "Seychelles" msgstr "Seychelles" #: lang.pm:406 #, c-format msgid "Sudan" msgstr "Sudan" #: lang.pm:407 mirror.pm:38 timezone.pm:254 #, c-format msgid "Sweden" msgstr "Svètzia" #: lang.pm:408 timezone.pm:222 #, c-format msgid "Singapore" msgstr "Singabura" #: lang.pm:409 #, c-format msgid "Saint Helena" msgstr "Sant'Elena" #: lang.pm:410 timezone.pm:252 #, c-format msgid "Slovenia" msgstr "Slovènia" #: lang.pm:411 #, c-format msgid "Svalbard and Jan Mayen Islands" msgstr "Svalbard e Jan Mayen" #: lang.pm:412 mirror.pm:35 timezone.pm:251 #, c-format msgid "Slovakia" msgstr "Slovàkia" #: lang.pm:413 #, c-format msgid "Sierra Leone" msgstr "Sierra Leone" #: lang.pm:414 #, c-format msgid "San Marino" msgstr "San Marino" #: lang.pm:415 #, c-format msgid "Senegal" msgstr "Senegàl" #: lang.pm:416 #, c-format msgid "Somalia" msgstr "Somàlia" #: lang.pm:417 #, c-format msgid "Suriname" msgstr "Suriname" #: lang.pm:418 #, c-format msgid "Sao Tome and Principe" msgstr "Sao Tomè e Prìncipe" #: lang.pm:419 #, c-format msgid "El Salvador" msgstr "El Salvadòr" #: lang.pm:420 #, c-format msgid "Syria" msgstr "Sìria" #: lang.pm:421 #, c-format msgid "Swaziland" msgstr "Swaziland" #: lang.pm:422 #, c-format msgid "Turks and Caicos Islands" msgstr "Turks Caicos" #: lang.pm:423 #, c-format msgid "Chad" msgstr "Çad" #: lang.pm:424 #, c-format msgid "French Southern Territories" msgstr "Terras Francesas de Mesudì" #: lang.pm:425 #, c-format msgid "Togo" msgstr "Togo" #: lang.pm:426 mirror.pm:41 timezone.pm:224 #, c-format msgid "Thailand" msgstr "Tailàndia" #: lang.pm:427 #, c-format msgid "Tajikistan" msgstr "Tagìkistan" #: lang.pm:428 #, c-format msgid "Tokelau" msgstr "Tokelau" #: lang.pm:429 #, c-format msgid "East Timor" msgstr "Timor Est" #: lang.pm:430 #, c-format msgid "Turkmenistan" msgstr "Turkmenistàn" #: lang.pm:431 #, c-format msgid "Tunisia" msgstr "Tunisia" #: lang.pm:432 #, c-format msgid "Tonga" msgstr "Tonga" #: lang.pm:433 timezone.pm:225 #, c-format msgid "Turkey" msgstr "Turkia" #: lang.pm:434 #, c-format msgid "Trinidad and Tobago" msgstr "Trinidad Tobago" #: lang.pm:435 #, c-format msgid "Tuvalu" msgstr "Tuvalu" #: lang.pm:436 mirror.pm:40 timezone.pm:223 #, c-format msgid "Taiwan" msgstr "Taiwan" #: lang.pm:437 timezone.pm:208 #, c-format msgid "Tanzania" msgstr "Tanzània" #: lang.pm:438 timezone.pm:256 #, c-format msgid "Ukraine" msgstr "Ucraina" #: lang.pm:439 #, c-format msgid "Uganda" msgstr "Uganda" #: lang.pm:440 #, c-format msgid "United States Minor Outlying Islands" msgstr "United States Minor Outlying Islands" #: lang.pm:441 mirror.pm:42 timezone.pm:264 #, c-format msgid "United States" msgstr "Stadus Unius" #: lang.pm:442 #, c-format msgid "Uruguay" msgstr "Uruguay" #: lang.pm:443 #, c-format msgid "Uzbekistan" msgstr "Usbekistàn" #: lang.pm:444 #, c-format msgid "Vatican" msgstr "Vaticanu" #: lang.pm:445 #, c-format msgid "Saint Vincent and the Grenadines" msgstr "Saint Vincent e Grenadines" #: lang.pm:446 #, c-format msgid "Venezuela" msgstr "Venezuela" #: lang.pm:447 #, c-format msgid "Virgin Islands (British)" msgstr "Virgin Islands (British)" #: lang.pm:448 #, c-format msgid "Virgin Islands (U.S.)" msgstr "Virgin Islands (U.S.)" #: lang.pm:449 #, c-format msgid "Vietnam" msgstr "Vietnàm" #: lang.pm:450 #, c-format msgid "Vanuatu" msgstr "Vanuatu" #: lang.pm:451 #, c-format msgid "Wallis and Futuna" msgstr "Wallis e Futuna" #: lang.pm:452 #, c-format msgid "Samoa" msgstr "Samoa" #: lang.pm:453 #, c-format msgid "Yemen" msgstr "Yemen" #: lang.pm:454 #, c-format msgid "Mayotte" msgstr "Mayotte" #: lang.pm:455 mirror.pm:36 timezone.pm:207 #, c-format msgid "South Africa" msgstr "Sud Àfriga" #: lang.pm:456 #, c-format msgid "Zambia" msgstr "Zàmbia" #: lang.pm:457 #, c-format msgid "Zimbabwe" msgstr "Zimbabwe" #: lang.pm:1216 #, c-format msgid "Welcome to %s" msgstr "Beni bènniu a %s" #: lvm.pm:86 #, c-format msgid "Moving used physical extents to other physical volumes failed" msgstr "" #: lvm.pm:143 #, c-format msgid "Physical volume %s is still in use" msgstr "" #: lvm.pm:153 #, c-format msgid "Remove the logical volumes first\n" msgstr "" #: lvm.pm:186 #, c-format msgid "The bootloader can't handle /boot on multiple physical volumes" msgstr "" #. -PO: keep the double empty lines between sections, this is formatted a la LaTeX #: messages.pm:11 #, c-format msgid "" "Introduction\n" "\n" "The operating system and the different components available in the Mageia " "Linux distribution \n" "shall be called the \"Software Products\" hereafter. The Software Products " "include, but are not \n" "restricted to, the set of programs, methods, rules and documentation related " "to the operating \n" "system and the different components of the Mageia Linux distribution, and " "any applications \n" "distributed with these products provided by Mageia's licensors or " "suppliers.\n" "\n" "\n" "1. License Agreement\n" "\n" "Please read this document carefully. This document is a license agreement " "between you and \n" "Mageia which applies to the Software Products.\n" "By installing, duplicating or using any of the Software Products in any " "manner, you explicitly \n" "accept and fully agree to conform to the terms and conditions of this " "License. \n" "If you disagree with any portion of the License, you are not allowed to " "install, duplicate or use \n" "the Software Products. \n" "Any attempt to install, duplicate or use the Software Products in a manner " "which does not comply \n" "with the terms and conditions of this License is void and will terminate " "your rights under this \n" "License. Upon termination of the License, you must immediately destroy all " "copies of the \n" "Software Products.\n" "\n" "\n" "2. Limited Warranty\n" "\n" "The Software Products and attached documentation are provided \"as is\", " "with no warranty, to the \n" "extent permitted by law.\n" "Neither Mageia nor its licensors or suppliers will, in any circumstances and " "to the extent \n" "permitted by law, be liable for any special, incidental, direct or indirect " "damages whatsoever \n" "(including without limitation damages for loss of business, interruption of " "business, financial \n" "loss, legal fees and penalties resulting from a court judgment, or any other " "consequential loss) \n" "arising out of the use or inability to use the Software Products, even if " "Mageia or its \n" "licensors or suppliers have been advised of the possibility or occurrence of " "such damages.\n" "\n" "LIMITED LIABILITY LINKED TO POSSESSING OR USING PROHIBITED SOFTWARE IN SOME " "COUNTRIES\n" "\n" "To the extent permitted by law, neither Mageia nor its licensors, suppliers " "or\n" "distributors will, in any circumstances, be liable for any special, " "incidental, direct or indirect \n" "damages whatsoever (including without limitation damages for loss of " "business, interruption of \n" "business, financial loss, legal fees and penalties resulting from a court " "judgment, or any \n" "other consequential loss) arising out of the possession and use of software " "components or \n" "arising out of downloading software components from one of Mageia Linux " "sites which are \n" "prohibited or restricted in some countries by local laws.\n" "This limited liability applies to, but is not restricted to, the strong " "cryptography components \n" "included in the Software Products.\n" "However, because some jurisdictions do not allow the exclusion or limitation " "or liability for \n" "consequential or incidental damages, the above limitation may not apply to " "you. \n" "\n" "\n" "3. The GPL License and Related Licenses\n" "\n" "The Software Products consist of components created by different persons or " "entities.\n" "Most of these licenses allow you to use, duplicate, adapt or redistribute " "the components which \n" "they cover. Please read carefully the terms and conditions of the license " "agreement for each component \n" "before using any component. Any question on a component license should be " "addressed to the component \n" "licensor or supplier and not to Mageia.\n" "The programs developed by Mageia are governed by the GPL License. " "Documentation written \n" "by Mageia is governed by a specific license. Please refer to the " "documentation for \n" "further details.\n" "\n" "\n" "4. Intellectual Property Rights\n" "\n" "All rights to the components of the Software Products belong to their " "respective authors and are \n" "protected by intellectual property and copyright laws applicable to software " "programs.\n" "Mageia and its suppliers and licensors reserves their rights to modify or " "adapt the Software \n" "Products, as a whole or in parts, by all means and for all purposes.\n" "\"Mageia\", \"Mageia Linux\" and associated logos are trademarks of " "Mageia \n" "\n" "\n" "5. Governing Laws \n" "\n" "If any portion of this agreement is held void, illegal or inapplicable by a " "court judgment, this \n" "portion is excluded from this contract. You remain bound by the other " "applicable sections of the \n" "agreement.\n" "The terms and conditions of this License are governed by the Laws of " "France.\n" "All disputes on the terms of this license will preferably be settled out of " "court. As a last \n" "resort, the dispute will be referred to the appropriate Courts of Law of " "Paris - France.\n" "For any question on this document, please contact Mageia." msgstr "" #: messages.pm:93 #, c-format msgid "" "Warning: Free Software may not necessarily be patent free, and some Free\n" "Software included may be covered by patents in your country. For example, " "the\n" "MP3 decoders included may require a licence for further usage (see\n" "http://www.mp3licensing.com for more details). If you are unsure if a " "patent\n" "may be applicable to you, check your local laws." msgstr "" #. -PO: keep the double empty lines between sections, this is formatted a la LaTeX #: messages.pm:102 #, c-format msgid "" "Congratulations, installation is complete.\n" "Remove the boot media and press Enter to reboot.\n" "\n" "\n" "For information on fixes which are available for this release of Mageia " "Linux,\n" "consult the Errata available from:\n" "\n" "\n" "%s\n" "\n" "\n" "Information on configuring your system is available in the post\n" "install chapter of the Official Mageia Linux User's Guide." msgstr "" "Cumprimentus, s'aposentadura est acabada.\n" "Boga su mèdiu de alluidura e craca return po torrai a allui.\n" "\n" "\n" "Po sciri de ajorronus disponiditzus po custa versioni de Mageia Linux,\n" "ligi is Errata a disposta de:\n" "\n" "\n" "%s\n" "\n" "\n" "Imparus po assetiai su sistema funt a disposta in su cabìtulu\n" "post install de sa Official Mageia Linux User's Guide." #: modules/interactive.pm:19 #, c-format msgid "This driver has no configuration parameter!" msgstr "" #: modules/interactive.pm:22 #, c-format msgid "Module configuration" msgstr "Assètiu mòdulu" #: modules/interactive.pm:22 #, c-format msgid "You can configure each parameter of the module here." msgstr "Podis assetiai dònnia paràmentru de su mòdulu innoi." #: modules/interactive.pm:64 #, c-format msgid "Found %s interfaces" msgstr "Agatadas %s interfacis" #: modules/interactive.pm:65 #, c-format msgid "Do you have another one?" msgstr "" #: modules/interactive.pm:66 #, c-format msgid "Do you have any %s interfaces?" msgstr "Tenis interfacis %s?" #: modules/interactive.pm:72 #, c-format msgid "See hardware info" msgstr "Càstia sa sceda hardware" #: modules/interactive.pm:83 #, c-format msgid "Installing driver for USB controller" msgstr "Aposentu driver po controlladori USB" #: modules/interactive.pm:84 #, c-format msgid "Installing driver for firewire controller %s" msgstr "Aposentu driver po controlladori firewire %s" #: modules/interactive.pm:85 #, c-format msgid "Installing driver for hard disk drive controller %s" msgstr "Aposentu driver po controlladori de discu tostau %s" #: modules/interactive.pm:86 #, c-format msgid "Installing driver for ethernet controller %s" msgstr "Aposentu driver po controlladori ethernet %s" #. -PO: the first %s is the card type (scsi, network, sound,...) #. -PO: the second is the vendor+model name #: modules/interactive.pm:97 #, c-format msgid "Installing driver for %s card %s" msgstr "" #: modules/interactive.pm:100 #, c-format msgid "Configuring Hardware" msgstr "" #: modules/interactive.pm:111 #, c-format msgid "" "You may now provide options to module %s.\n" "Note that any address should be entered with the prefix 0x like '0x123'" msgstr "" #: modules/interactive.pm:117 #, c-format msgid "" "You may now provide options to module %s.\n" "Options are in format ``name=value name2=value2 ...''.\n" "For instance, ``io=0x300 irq=7''" msgstr "" #: modules/interactive.pm:119 #, c-format msgid "Module options:" msgstr "" #. -PO: the %s is the driver type (scsi, network, sound,...) #: modules/interactive.pm:132 #, c-format msgid "Which %s driver should I try?" msgstr "" #: modules/interactive.pm:141 #, c-format msgid "" "In some cases, the %s driver needs to have extra information to work\n" "properly, although it normally works fine without them. Would you like to " "specify\n" "extra options for it or allow the driver to probe your machine for the\n" "information it needs? Occasionally, probing will hang a computer, but it " "should\n" "not cause any damage." msgstr "" #: modules/interactive.pm:145 #, c-format msgid "Autoprobe" msgstr "" #: modules/interactive.pm:145 #, c-format msgid "Specify options" msgstr "" #: modules/interactive.pm:157 #, c-format msgid "" "Loading module %s failed.\n" "Do you want to try again with other parameters?" msgstr "" #: mygtk2.pm:1541 mygtk2.pm:1542 #, c-format msgid "Password is trivial to guess" msgstr "" #: mygtk2.pm:1543 #, c-format msgid "Password should be resistant to basic attacks" msgstr "" #: mygtk2.pm:1544 mygtk2.pm:1545 #, fuzzy, c-format msgid "Password seems secure" msgstr "Password po umperadori" #: partition_table.pm:415 #, c-format msgid "mount failed: " msgstr "" #: partition_table.pm:527 #, c-format msgid "Extended partition not supported on this platform" msgstr "" #: partition_table.pm:545 #, c-format msgid "" "You have a hole in your partition table but I can not use it.\n" "The only solution is to move your primary partitions to have the hole next " "to the extended partitions." msgstr "" #: partition_table/raw.pm:299 #, c-format msgid "" "Something bad is happening on your drive. \n" "A test to check the integrity of data has failed. \n" "It means writing anything on the disk will end up with random, corrupted " "data." msgstr "" #: pkgs.pm:252 pkgs.pm:255 pkgs.pm:268 #, c-format msgid "Unused packages removal" msgstr "" #: pkgs.pm:252 #, c-format msgid "Finding unused hardware packages..." msgstr "" #: pkgs.pm:255 #, c-format msgid "Finding unused localization packages..." msgstr "" #: pkgs.pm:269 #, c-format msgid "" "We have detected that some packages are not needed for your system " "configuration." msgstr "" #: pkgs.pm:270 #, c-format msgid "We will remove the following packages, unless you choose otherwise:" msgstr "" #: pkgs.pm:273 pkgs.pm:274 #, fuzzy, c-format msgid "Unused hardware support" msgstr "abiva su suportu arràdiu" #: pkgs.pm:277 pkgs.pm:278 #, c-format msgid "Unused localization" msgstr "" #: raid.pm:42 #, c-format msgid "Cannot add a partition to _formatted_ RAID %s" msgstr "" #: raid.pm:165 #, c-format msgid "Not enough partitions for RAID level %d\n" msgstr "" #: scanner.pm:96 #, c-format msgid "Could not create directory /usr/share/sane/firmware!" msgstr "" #: scanner.pm:107 #, c-format msgid "Could not create link /usr/share/sane/%s!" msgstr "" #: scanner.pm:114 #, c-format msgid "Could not copy firmware file %s to /usr/share/sane/firmware!" msgstr "" #: scanner.pm:121 #, c-format msgid "Could not set permissions of firmware file %s!" msgstr "" #: scanner.pm:200 #, c-format msgid "Scannerdrake" msgstr "Scannerdrake" #: scanner.pm:201 #, c-format msgid "Could not install the packages needed to share your scanner(s)." msgstr "" #: scanner.pm:202 #, c-format msgid "Your scanner(s) will not be available for non-root users." msgstr "" #: security/help.pm:11 #, c-format msgid "Accept bogus IPv4 error messages." msgstr "" #: security/help.pm:13 #, c-format msgid "Accept broadcasted icmp echo." msgstr "" #: security/help.pm:15 #, c-format msgid "Accept icmp echo." msgstr "" #: security/help.pm:17 #, fuzzy, c-format msgid "Allow autologin." msgstr "Autologin" #. -PO: here "ALL" is a value in a pull-down menu; translate it the same as "ALL" is #: security/help.pm:21 #, c-format msgid "" "If set to \"ALL\", /etc/issue and /etc/issue.net are allowed to exist.\n" "\n" "If set to \"None\", no issues are allowed.\n" "\n" "Else only /etc/issue is allowed." msgstr "" #: security/help.pm:27 #, c-format msgid "Allow reboot by the console user." msgstr "" #: security/help.pm:29 #, c-format msgid "Allow remote root login." msgstr "" #: security/help.pm:31 #, c-format msgid "Allow direct root login." msgstr "" #: security/help.pm:33 #, c-format msgid "" "Allow the list of users on the system on display managers (kdm and gdm)." msgstr "" #: security/help.pm:35 #, c-format msgid "" "Allow to export display when\n" "passing from the root account to the other users.\n" "\n" "See pam_xauth(8) for more details.'" msgstr "" #: security/help.pm:40 #, c-format msgid "" "Allow X connections:\n" "\n" "- \"All\" (all connections are allowed),\n" "\n" "- \"Local\" (only connection from local machine),\n" "\n" "- \"None\" (no connection)." msgstr "" #: security/help.pm:48 #, c-format msgid "" "The argument specifies if clients are authorized to connect\n" "to the X server from the network on the tcp port 6000 or not." msgstr "" #. -PO: here "ALL", "Local" and "None" are values in a pull-down menu; translate them the same as they're #: security/help.pm:53 #, c-format msgid "" "Authorize:\n" "\n" "- all services controlled by tcp_wrappers (see hosts.deny(5) man page) if " "set to \"ALL\",\n" "\n" "- only local ones if set to \"Local\"\n" "\n" "- none if set to \"None\".\n" "\n" "To authorize the services you need, use /etc/hosts.allow (see hosts.allow" "(5))." msgstr "" #: security/help.pm:63 #, c-format msgid "" "If SERVER_LEVEL (or SECURE_LEVEL if absent)\n" "is greater than 3 in /etc/security/msec/security.conf, creates the\n" "symlink /etc/security/msec/server to point to\n" "/etc/security/msec/server.<SERVER_LEVEL>.\n" "\n" "The /etc/security/msec/server is used by chkconfig --add to decide to\n" "add a service if it is present in the file during the installation of\n" "packages." msgstr "" #: security/help.pm:72 #, c-format msgid "" "Enable crontab and at for users.\n" "\n" "Put allowed users in /etc/cron.allow and /etc/at.allow (see man at(1)\n" "and crontab(1))." msgstr "" #: security/help.pm:77 #, c-format msgid "Enable syslog reports to console 12" msgstr "" #: security/help.pm:79 #, c-format msgid "" "Enable name resolution spoofing protection. If\n" "\"%s\" is true, also reports to syslog." msgstr "" #: security/help.pm:80 #, c-format msgid "Security Alerts:" msgstr "" #: security/help.pm:82 #, c-format msgid "Enable IP spoofing protection." msgstr "" #: security/help.pm:84 #, c-format msgid "Enable libsafe if libsafe is found on the system." msgstr "" #: security/help.pm:86 #, c-format msgid "Enable the logging of IPv4 strange packets." msgstr "" #: security/help.pm:88 #, c-format msgid "Enable msec hourly security check." msgstr "" #: security/help.pm:90 #, c-format msgid "" "Enable su only from members of the wheel group. If set to no, allows su from " "any user." msgstr "" #: security/help.pm:92 #, c-format msgid "Use password to authenticate users." msgstr "" #: security/help.pm:94 #, c-format msgid "Activate ethernet cards promiscuity check." msgstr "" #: security/help.pm:96 #, c-format msgid "Activate daily security check." msgstr "" #: security/help.pm:98 #, c-format msgid "Enable sulogin(8) in single user level." msgstr "" #: security/help.pm:100 #, c-format msgid "Add the name as an exception to the handling of password aging by msec." msgstr "" #: security/help.pm:102 #, c-format msgid "Set password aging to \"max\" days and delay to change to \"inactive\"." msgstr "" #: security/help.pm:104 #, c-format msgid "Set the password history length to prevent password reuse." msgstr "" #: security/help.pm:106 #, c-format msgid "" "Set the password minimum length and minimum number of digit and minimum " "number of capitalized letters." msgstr "" #: security/help.pm:108 #, c-format msgid "Set the root's file mode creation mask." msgstr "" #: security/help.pm:109 #, c-format msgid "if set to yes, check open ports." msgstr "" #: security/help.pm:110 #, c-format msgid "" "if set to yes, check for:\n" "\n" "- empty passwords,\n" "\n" "- no password in /etc/shadow\n" "\n" "- for users with the 0 id other than root." msgstr "" #: security/help.pm:117 #, c-format msgid "if set to yes, check permissions of files in the users' home." msgstr "" #: security/help.pm:118 #, c-format msgid "if set to yes, check if the network devices are in promiscuous mode." msgstr "" #: security/help.pm:119 #, c-format msgid "if set to yes, run the daily security checks." msgstr "" #: security/help.pm:120 #, c-format msgid "if set to yes, check additions/removals of sgid files." msgstr "" #: security/help.pm:121 #, c-format msgid "if set to yes, check empty password in /etc/shadow." msgstr "" #: security/help.pm:122 #, c-format msgid "if set to yes, verify checksum of the suid/sgid files." msgstr "" #: security/help.pm:123 #, c-format msgid "if set to yes, check additions/removals of suid root files." msgstr "" #: security/help.pm:124 #, c-format msgid "if set to yes, report unowned files." msgstr "" #: security/help.pm:125 #, c-format msgid "if set to yes, check files/directories writable by everybody." msgstr "" #: security/help.pm:126 #, c-format msgid "if set to yes, run chkrootkit checks." msgstr "" #: security/help.pm:127 #, c-format msgid "" "if set, send the mail report to this email address else send it to root." msgstr "" #: security/help.pm:128 #, c-format msgid "if set to yes, report check result by mail." msgstr "" #: security/help.pm:129 #, c-format msgid "Do not send mails if there's nothing to warn about" msgstr "" #: security/help.pm:130 #, c-format msgid "if set to yes, run some checks against the rpm database." msgstr "" #: security/help.pm:131 #, c-format msgid "if set to yes, report check result to syslog." msgstr "" #: security/help.pm:132 #, c-format msgid "if set to yes, reports check result to tty." msgstr "" #: security/help.pm:134 #, c-format msgid "Set shell commands history size. A value of -1 means unlimited." msgstr "" #: security/help.pm:136 #, c-format msgid "Set the shell timeout. A value of zero means no timeout." msgstr "" #: security/help.pm:136 #, c-format msgid "Timeout unit is second" msgstr "" #: security/help.pm:138 #, c-format msgid "Set the user's file mode creation mask." msgstr "" #: security/l10n.pm:11 #, c-format msgid "Accept bogus IPv4 error messages" msgstr "" #: security/l10n.pm:12 #, c-format msgid "Accept broadcasted icmp echo" msgstr "" #: security/l10n.pm:13 #, c-format msgid "Accept icmp echo" msgstr "" #: security/l10n.pm:15 #, c-format msgid "/etc/issue* exist" msgstr "" #: security/l10n.pm:16 #, c-format msgid "Reboot by the console user" msgstr "" #: security/l10n.pm:17 #, c-format msgid "Allow remote root login" msgstr "" #: security/l10n.pm:18 #, c-format msgid "Direct root login" msgstr "" #: security/l10n.pm:19 #, c-format msgid "List users on display managers (kdm and gdm)" msgstr "" #: security/l10n.pm:20 #, c-format msgid "Export display when passing from root to the other users" msgstr "" #: security/l10n.pm:21 #, c-format msgid "Allow X Window connections" msgstr "" #: security/l10n.pm:22 #, c-format msgid "Authorize TCP connections to X Window" msgstr "" #: security/l10n.pm:23 #, c-format msgid "Authorize all services controlled by tcp_wrappers" msgstr "" #: security/l10n.pm:24 #, c-format msgid "Chkconfig obey msec rules" msgstr "" #: security/l10n.pm:25 #, c-format msgid "Enable \"crontab\" and \"at\" for users" msgstr "" #: security/l10n.pm:26 #, c-format msgid "Syslog reports to console 12" msgstr "" #: security/l10n.pm:27 #, c-format msgid "Name resolution spoofing protection" msgstr "" #: security/l10n.pm:28 #, c-format msgid "Enable IP spoofing protection" msgstr "" #: security/l10n.pm:29 #, c-format msgid "Enable libsafe if libsafe is found on the system" msgstr "" #: security/l10n.pm:30 #, c-format msgid "Enable the logging of IPv4 strange packets" msgstr "" #: security/l10n.pm:31 #, c-format msgid "Enable msec hourly security check" msgstr "" #: security/l10n.pm:32 #, c-format msgid "Enable su only from the wheel group members" msgstr "" #: security/l10n.pm:33 #, c-format msgid "Use password to authenticate users" msgstr "" #: security/l10n.pm:34 #, c-format msgid "Ethernet cards promiscuity check" msgstr "" #: security/l10n.pm:35 #, c-format msgid "Daily security check" msgstr "" #: security/l10n.pm:36 #, c-format msgid "Sulogin(8) in single user level" msgstr "" #: security/l10n.pm:37 #, c-format msgid "No password aging for" msgstr "" #: security/l10n.pm:38 #, c-format msgid "Set password expiration and account inactivation delays" msgstr "" #: security/l10n.pm:39 #, c-format msgid "Password history length" msgstr "" #: security/l10n.pm:40 #, c-format msgid "Password minimum length and number of digits and upcase letters" msgstr "" #: security/l10n.pm:41 #, c-format msgid "Root umask" msgstr "" #: security/l10n.pm:42 #, c-format msgid "Shell history size" msgstr "" #: security/l10n.pm:43 #, c-format msgid "Shell timeout" msgstr "" #: security/l10n.pm:44 #, c-format msgid "User umask" msgstr "" #: security/l10n.pm:45 #, c-format msgid "Check open ports" msgstr "" #: security/l10n.pm:46 #, c-format msgid "Check for unsecured accounts" msgstr "" #: security/l10n.pm:47 #, c-format msgid "Check permissions of files in the users' home" msgstr "" #: security/l10n.pm:48 #, c-format msgid "Check if the network devices are in promiscuous mode" msgstr "" #: security/l10n.pm:49 #, c-format msgid "Run the daily security checks" msgstr "" #: security/l10n.pm:50 #, c-format msgid "Check additions/removals of sgid files" msgstr "" #: security/l10n.pm:51 #, c-format msgid "Check empty password in /etc/shadow" msgstr "" #: security/l10n.pm:52 #, c-format msgid "Verify checksum of the suid/sgid files" msgstr "" #: security/l10n.pm:53 #, c-format msgid "Check additions/removals of suid root files" msgstr "" #: security/l10n.pm:54 #, c-format msgid "Report unowned files" msgstr "" #: security/l10n.pm:55 #, c-format msgid "Check files/directories writable by everybody" msgstr "" #: security/l10n.pm:56 #, c-format msgid "Run chkrootkit checks" msgstr "" #: security/l10n.pm:57 #, c-format msgid "Do not send empty mail reports" msgstr "" #: security/l10n.pm:58 #, c-format msgid "If set, send the mail report to this email address else send it to root" msgstr "" #: security/l10n.pm:59 #, c-format msgid "Report check result by mail" msgstr "" #: security/l10n.pm:60 #, c-format msgid "Run some checks against the rpm database" msgstr "" #: security/l10n.pm:61 #, c-format msgid "Report check result to syslog" msgstr "" #: security/l10n.pm:62 #, c-format msgid "Reports check result to tty" msgstr "" #: security/level.pm:10 #, c-format msgid "Disable msec" msgstr "" #: security/level.pm:11 #, c-format msgid "Standard" msgstr "Standard" #: security/level.pm:12 #, fuzzy, c-format msgid "Secure" msgstr "Siguresa" #: security/level.pm:40 #, c-format msgid "" "This level is to be used with care, as it disables all additional security\n" "provided by msec. Use it only when you want to take care of all aspects of " "system security\n" "on your own." msgstr "" #: security/level.pm:43 #, c-format msgid "" "This is the standard security recommended for a computer that will be used " "to connect to the Internet as a client." msgstr "" #: security/level.pm:44 #, c-format msgid "" "With this security level, the use of this system as a server becomes " "possible.\n" "The security is now high enough to use the system as a server which can " "accept\n" "connections from many clients. Note: if your machine is only a client on the " "Internet, you should choose a lower level." msgstr "" #: security/level.pm:51 #, c-format msgid "DrakSec Basic Options" msgstr "" #: security/level.pm:54 #, c-format msgid "Please choose the desired security level" msgstr "" #. -PO: this string is used to properly format "<security level>: <level description>" #: security/level.pm:58 #, c-format msgid "%s: %s" msgstr "" #: security/level.pm:61 #, c-format msgid "Security Administrator:" msgstr "" #: security/level.pm:62 #, c-format msgid "Login or email:" msgstr "" #: services.pm:19 #, c-format msgid "Listen and dispatch ACPI events from the kernel" msgstr "" #: services.pm:20 #, c-format msgid "Launch the ALSA (Advanced Linux Sound Architecture) sound system" msgstr "" #: services.pm:21 #, c-format msgid "Anacron is a periodic command scheduler." msgstr "" #: services.pm:22 #, c-format msgid "" "apmd is used for monitoring battery status and logging it via syslog.\n" "It can also be used for shutting down the machine when the battery is low." msgstr "" #: services.pm:24 #, c-format msgid "" "Runs commands scheduled by the at command at the time specified when\n" "at was run, and runs batch commands when the load average is low enough." msgstr "" #: services.pm:26 #, c-format msgid "Avahi is a ZeroConf daemon which implements an mDNS stack" msgstr "" #: services.pm:27 #, c-format msgid "Set CPU frequency settings" msgstr "" #: services.pm:28 #, c-format msgid "" "cron is a standard UNIX program that runs user-specified programs\n" "at periodic scheduled times. vixie cron adds a number of features to the " "basic\n" "UNIX cron, including better security and more powerful configuration options." msgstr "" #: services.pm:31 #, c-format msgid "" "Common UNIX Printing System (CUPS) is an advanced printer spooling system" msgstr "" #: services.pm:32 #, c-format msgid "Launches the graphical display manager" msgstr "" #: services.pm:33 #, c-format msgid "" "FAM is a file monitoring daemon. It is used to get reports when files " "change.\n" "It is used by GNOME and KDE" msgstr "" #: services.pm:35 #, c-format msgid "" "G15Daemon allows users access to all extra keys by decoding them and \n" "pushing them back into the kernel via the linux UINPUT driver. This driver " "must be loaded \n" "before g15daemon can be used for keyboard access. The G15 LCD is also " "supported. By default, \n" "with no other clients active, g15daemon will display a clock. Client " "applications and \n" "scripts can access the LCD via a simple API." msgstr "" #: services.pm:40 #, c-format msgid "" "GPM adds mouse support to text-based Linux applications such the\n" "Midnight Commander. It also allows mouse-based console cut-and-paste " "operations,\n" "and includes support for pop-up menus on the console." msgstr "" #: services.pm:43 #, c-format msgid "HAL is a daemon that collects and maintains information about hardware" msgstr "" #: services.pm:44 #, c-format msgid "" "HardDrake runs a hardware probe, and optionally configures\n" "new/changed hardware." msgstr "" #: services.pm:46 #, c-format msgid "" "Apache is a World Wide Web server. It is used to serve HTML files and CGI." msgstr "" #: services.pm:47 #, c-format msgid "" "The internet superserver daemon (commonly called inetd) starts a\n" "variety of other internet services as needed. It is responsible for " "starting\n" "many services, including telnet, ftp, rsh, and rlogin. Disabling inetd " "disables\n" "all of the services it is responsible for." msgstr "" #: services.pm:51 #, c-format msgid "Automates a packet filtering firewall with ip6tables" msgstr "" #: services.pm:52 #, c-format msgid "Automates a packet filtering firewall with iptables" msgstr "" #: services.pm:53 #, c-format msgid "" "Launch packet filtering for Linux kernel 2.2 series, to set\n" "up a firewall to protect your machine from network attacks." msgstr "" #: services.pm:55 #, c-format msgid "" "Evenly distributes IRQ load across multiple CPUs for enhanced performance" msgstr "" #: services.pm:56 #, c-format msgid "" "This package loads the selected keyboard map as set in\n" "/etc/sysconfig/keyboard. This can be selected using the kbdconfig utility.\n" "You should leave this enabled for most machines." msgstr "" #: services.pm:59 #, c-format msgid "" "Automatic regeneration of kernel header in /boot for\n" "/usr/include/linux/{autoconf,version}.h" msgstr "" #: services.pm:61 #, c-format msgid "Automatic detection and configuration of hardware at boot." msgstr "" #: services.pm:62 #, c-format msgid "Tweaks system behavior to extend battery life" msgstr "" #: services.pm:63 #, c-format msgid "" "Linuxconf will sometimes arrange to perform various tasks\n" "at boot-time to maintain the system configuration." msgstr "" #: services.pm:65 #, c-format msgid "" "lpd is the print daemon required for lpr to work properly. It is\n" "basically a server that arbitrates print jobs to printer(s)." msgstr "" #: services.pm:67 #, c-format msgid "" "Linux Virtual Server, used to build a high-performance and highly\n" "available server." msgstr "" #: services.pm:69 #, c-format msgid "Monitors the network (Interactive Firewall and wireless" msgstr "" #: services.pm:70 #, c-format msgid "Software RAID monitoring and management" msgstr "" #: services.pm:71 #, c-format msgid "" "DBUS is a daemon which broadcasts notifications of system events and other " "messages" msgstr "" #: services.pm:72 #, c-format msgid "Enables MSEC security policy on system startup" msgstr "" #: services.pm:73 #, c-format msgid "" "named (BIND) is a Domain Name Server (DNS) that is used to resolve host " "names to IP addresses." msgstr "" #: services.pm:74 #, c-format msgid "Initializes network console logging" msgstr "" #: services.pm:75 #, c-format msgid "" "Mounts and unmounts all Network File System (NFS), SMB (Lan\n" "Manager/Windows), and NCP (NetWare) mount points." msgstr "" #: services.pm:77 #, c-format msgid "" "Activates/Deactivates all network interfaces configured to start\n" "at boot time." msgstr "" #: services.pm:79 #, c-format msgid "Requires network to be up if enabled" msgstr "" #: services.pm:80 #, c-format msgid "Wait for the hotplugged network to be up" msgstr "" #: services.pm:81 #, c-format msgid "" "NFS is a popular protocol for file sharing across TCP/IP networks.\n" "This service provides NFS server functionality, which is configured via the\n" "/etc/exports file." msgstr "" #: services.pm:84 #, c-format msgid "" "NFS is a popular protocol for file sharing across TCP/IP\n" "networks. This service provides NFS file locking functionality." msgstr "" #: services.pm:86 #, c-format msgid "Synchronizes system time using the Network Time Protocol (NTP)" msgstr "" #: services.pm:87 #, c-format msgid "" "Automatically switch on numlock key locker under console\n" "and Xorg at boot." msgstr "" #: services.pm:89 #, c-format msgid "Support the OKI 4w and compatible winprinters." msgstr "" #: services.pm:90 #, c-format msgid "Checks if a partition is close to full up" msgstr "" #: services.pm:91 #, c-format msgid "" "PCMCIA support is usually to support things like ethernet and\n" "modems in laptops. It will not get started unless configured so it is safe " "to have\n" "it installed on machines that do not need it." msgstr "" #: services.pm:94 #, c-format msgid "" "The portmapper manages RPC connections, which are used by\n" "protocols such as NFS and NIS. The portmap server must be running on " "machines\n" "which act as servers for protocols which make use of the RPC mechanism." msgstr "" #: services.pm:97 #, c-format msgid "Reserves some TCP ports" msgstr "" #: services.pm:98 #, c-format msgid "" "Postfix is a Mail Transport Agent, which is the program that moves mail from " "one machine to another." msgstr "" #: services.pm:99 #, c-format msgid "" "Saves and restores system entropy pool for higher quality random\n" "number generation." msgstr "" #: services.pm:101 #, c-format msgid "" "Assign raw devices to block devices (such as hard disk drive\n" "partitions), for the use of applications such as Oracle or DVD players" msgstr "" #: services.pm:103 #, fuzzy, c-format msgid "Nameserver information manager" msgstr "Scedas discu tostau" #: services.pm:104 #, c-format msgid "" "The routed daemon allows for automatic IP router table updated via\n" "the RIP protocol. While RIP is widely used on small networks, more complex\n" "routing protocols are needed for complex networks." msgstr "" #: services.pm:107 #, c-format msgid "" "The rstat protocol allows users on a network to retrieve\n" "performance metrics for any machine on that network." msgstr "" #: services.pm:109 #, c-format msgid "" "Syslog is the facility by which many daemons use to log messages to various " "system log files. It is a good idea to always run rsyslog." msgstr "" #: services.pm:110 #, c-format msgid "" "The rusers protocol allows users on a network to identify who is\n" "logged in on other responding machines." msgstr "" #: services.pm:112 #, c-format msgid "" "The rwho protocol lets remote users get a list of all of the users\n" "logged into a machine running the rwho daemon (similar to finger)." msgstr "" #: services.pm:114 #, c-format msgid "" "SANE (Scanner Access Now Easy) enables to access scanners, video cameras, ..." msgstr "" #: services.pm:115 #, c-format msgid "Packet filtering firewall" msgstr "" #: services.pm:116 #, c-format msgid "" "The SMB/CIFS protocol enables to share access to files & printers and also " "integrates with a Windows Server domain" msgstr "" #: services.pm:117 #, c-format msgid "Launch the sound system on your machine" msgstr "" #: services.pm:118 #, c-format msgid "layer for speech analysis" msgstr "" #: services.pm:119 #, c-format msgid "" "Secure Shell is a network protocol that allows data to be exchanged over a " "secure channel between two computers" msgstr "" #: services.pm:120 #, c-format msgid "" "Syslog is the facility by which many daemons use to log messages\n" "to various system log files. It is a good idea to always run syslog." msgstr "" #: services.pm:122 #, c-format msgid "Moves the generated persistent udev rules to /etc/udev/rules.d" msgstr "" #: services.pm:123 #, c-format msgid "Load the drivers for your usb devices." msgstr "" #: services.pm:124 #, c-format msgid "A lightweight network traffic monitor" msgstr "" #: services.pm:125 #, c-format msgid "Starts the X Font Server." msgstr "" #: services.pm:126 #, c-format msgid "Starts other deamons on demand." msgstr "" #: services.pm:149 #, c-format msgid "Printing" msgstr "Imprenta" #: services.pm:150 #, c-format msgid "Internet" msgstr "Internet" #: services.pm:153 #, c-format msgid "File sharing" msgstr "" #: services.pm:155 #, c-format msgid "System" msgstr "Sistema" #: services.pm:160 #, c-format msgid "Remote Administration" msgstr "" #: services.pm:168 #, c-format msgid "Database Server" msgstr "" #: services.pm:179 services.pm:218 #, c-format msgid "Services" msgstr "Serbìtzius" #: services.pm:179 #, c-format msgid "Choose which services should be automatically started at boot time" msgstr "" #: services.pm:197 #, c-format msgid "%d activated for %d registered" msgstr "%d abivaus po %d assentaus" #: services.pm:234 #, c-format msgid "running" msgstr "" #: services.pm:234 #, c-format msgid "stopped" msgstr "" #: services.pm:239 #, c-format msgid "Services and daemons" msgstr "" #: services.pm:245 #, c-format msgid "" "No additional information\n" "about this service, sorry." msgstr "" #: services.pm:250 ugtk2.pm:924 #, c-format msgid "Info" msgstr "Scedas" #: services.pm:253 #, c-format msgid "Start when requested" msgstr "" #: services.pm:253 #, c-format msgid "On boot" msgstr "A s'alluidura" #: services.pm:271 #, c-format msgid "Start" msgstr "Start" #: services.pm:271 #, c-format msgid "Stop" msgstr "Firma" #: standalone.pm:25 #, c-format msgid "" "This program is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation; either version 2, or (at your option)\n" "any later version.\n" "\n" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, " "USA.\n" msgstr "" #: standalone.pm:44 #, c-format msgid "" "[--config-info] [--daemon] [--debug] [--default] [--show-conf]\n" "Backup and Restore application\n" "\n" "--default : save default directories.\n" "--debug : show all debug messages.\n" "--show-conf : list of files or directories to backup.\n" "--config-info : explain configuration file options (for non-X " "users).\n" "--daemon : use daemon configuration. \n" "--help : show this message.\n" "--version : show version number.\n" msgstr "" #: standalone.pm:56 #, c-format msgid "" "[--boot]\n" "OPTIONS:\n" " --boot - enable to configure boot loader\n" "default mode: offer to configure autologin feature" msgstr "" #: standalone.pm:60 #, c-format msgid "" "[OPTIONS] [PROGRAM_NAME]\n" "\n" "OPTIONS:\n" " --help - print this help message.\n" " --report - program should be one of %s tools\n" " --incident - program should be one of %s tools" msgstr "" #: standalone.pm:66 #, c-format msgid "" "[--add]\n" " --add - \"add a network interface\" wizard\n" " --del - \"delete a network interface\" wizard\n" " --skip-wizard - manage connections\n" " --internet - configure internet\n" " --wizard - like --add" msgstr "" #: standalone.pm:72 #, c-format msgid "" "\n" "Font Importation and monitoring application\n" "\n" "OPTIONS:\n" "--windows_import : import from all available windows partitions.\n" "--xls_fonts : show all fonts that already exist from xls\n" "--install : accept any font file and any directory.\n" "--uninstall : uninstall any font or any directory of font.\n" "--replace : replace all font if already exist\n" "--application : 0 none application.\n" " : 1 all application available supported.\n" " : name_of_application like so for staroffice \n" " : and gs for ghostscript for only this one." msgstr "" #: standalone.pm:87 #, c-format msgid "" "[OPTIONS]...\n" "%s Terminal Server Configurator\n" "--enable : enable MTS\n" "--disable : disable MTS\n" "--start : start MTS\n" "--stop : stop MTS\n" "--adduser : add an existing system user to MTS (requires username)\n" "--deluser : delete an existing system user from MTS (requires " "username)\n" "--addclient : add a client machine to MTS (requires MAC address, IP, " "nbi image name)\n" "--delclient : delete a client machine from MTS (requires MAC address, " "IP, nbi image name)" msgstr "" #: standalone.pm:99 #, c-format msgid "[keyboard]" msgstr "" #: standalone.pm:100 #, c-format msgid "[--file=myfile] [--word=myword] [--explain=regexp] [--alert]" msgstr "" #: standalone.pm:101 #, c-format msgid "" "[OPTIONS]\n" "Network & Internet connection and monitoring application\n" "\n" "--defaultintf interface : show this interface by default\n" "--connect : connect to internet if not already connected\n" "--disconnect : disconnect to internet if already connected\n" "--force : used with (dis)connect : force (dis)connection.\n" "--status : returns 1 if connected 0 otherwise, then exit.\n" "--quiet : do not be interactive. To be used with (dis)connect." msgstr "" #: standalone.pm:111 #, c-format msgid "" "[OPTION]...\n" " --no-confirmation do not ask first confirmation question in %s Update " "mode\n" " --no-verify-rpm do not verify packages signatures\n" " --changelog-first display changelog before filelist in the " "description window\n" " --merge-all-rpmnew propose to merge all .rpmnew/.rpmsave files found" msgstr "" #: standalone.pm:116 #, c-format msgid "" "[--manual] [--device=dev] [--update-sane=sane_source_dir] [--update-" "usbtable] [--dynamic=dev]" msgstr "" #: standalone.pm:117 #, c-format msgid "" " [everything]\n" " XFdrake [--noauto] monitor\n" " XFdrake resolution" msgstr "" #: standalone.pm:153 #, c-format msgid "" "\n" "Usage: %s [--auto] [--beginner] [--expert] [-h|--help] [--noauto] [--" "testing] [-v|--version] " msgstr "" #: timezone.pm:161 timezone.pm:162 #, fuzzy, c-format msgid "All servers" msgstr "X server" #: timezone.pm:196 #, c-format msgid "Global" msgstr "" #: timezone.pm:199 #, fuzzy, c-format msgid "Africa" msgstr "Sud Àfriga" #: timezone.pm:200 #, fuzzy, c-format msgid "Asia" msgstr "Àustria" #: timezone.pm:201 #, c-format msgid "Europe" msgstr "" #: timezone.pm:202 #, fuzzy, c-format msgid "North America" msgstr "Sud Àfriga" #: timezone.pm:203 #, fuzzy, c-format msgid "Oceania" msgstr "Macedònia" #: timezone.pm:204 #, fuzzy, c-format msgid "South America" msgstr "Sud Àfriga" #: timezone.pm:213 #, c-format msgid "Hong Kong" msgstr "Hong Kong" #: timezone.pm:250 #, c-format msgid "Russian Federation" msgstr "Rùssia" #: timezone.pm:258 #, c-format msgid "Yugoslavia" msgstr "Yugoslàvia" #: ugtk2.pm:812 #, c-format msgid "Is this correct?" msgstr "Andat beni?" #: ugtk2.pm:874 #, c-format msgid "You have chosen a file, not a directory" msgstr "As sçoberau unu file, no una directory" #: wizards.pm:95 #, c-format msgid "" "%s is not installed\n" "Click \"Next\" to install or \"Cancel\" to quit" msgstr "" "%s no est aposentau\n" "Crica \"Sighi\" po aposentai o \"Annudda\" po bessiri" #: wizards.pm:99 #, c-format msgid "Installation failed" msgstr "Aposentadura faddia" #~ msgid "" #~ "Option ``Restrict command line options'' is of no use without a password" #~ msgstr "" #~ "Sa scera ``Restrict command line options'' no balit sentza de una password" #~ msgid "Use an encrypted filesystem" #~ msgstr "Impreai unu filesystem cuau" #~ msgid "Use the Microsoft Windows® partition for loopback" #~ msgstr "Imprea sa pratzidura Microsoft Windows® po loopback" #~ msgid "Which partition do you want to use for Linux4Win?" #~ msgstr "Cali pratzidura bolis impreai po Linux4Win?" #~ msgid "Choose the sizes" #~ msgstr "Sçobera is mesuras" #~ msgid "Root partition size in MB: " #~ msgstr "Mesura de sa pratzidura root in MB: " #~ msgid "Swap partition size in MB: " #~ msgstr "Mesura de sa pratzidura swap in MB: " #~ msgid "" #~ "There is no FAT partition to use as loopback (or not enough space left)" #~ msgstr "" #~ "No dui at pratzidura FAT de impreai po loopback (no abarrat spàtziu " #~ "abasta)" #~ msgid "" #~ "The FAT resizer is unable to handle your partition, \n" #~ "the following error occurred: %s" #~ msgstr "" #~ "S'arremesuradori FAT no podit manijai sa pratzidura, \n" #~ "dui est sa faddina ki sighit: %s" #~ msgid "LILO/grub Installation" #~ msgstr "Aposentadura de LILO/Grub" #~ msgid "Precise RAM size if needed (found %d MB)" #~ msgstr "Indida sa mesura de sa RAM ki serbit (agataus %d MB)" #~ msgid "Give the ram size in MB" #~ msgstr "Dona sa mesura de sa RAM in MB" #~ msgid "" #~ "If you plan to use aboot, be careful to leave a free space (2048 sectors " #~ "is enough)\n" #~ "at the beginning of the disk" #~ msgstr "" #~ "Ki pensas de impreai aboot, atentu a lassai spàtziu lìberu (abastant 2048 " #~ "segaduras)\n" #~ "a su cumentzu de su discu" #~ msgid "Expand Tree" #~ msgstr "Allàdia s'arrampili" #~ msgid "Collapse Tree" #~ msgstr "Serra s'arrampili" #~ msgid "Choose action" #~ msgstr "Sçobera atzioni" #~ msgid "Active Directory with SFU" #~ msgstr "Active Directory cun SFU" #~ msgid "Active Directory with Winbind" #~ msgstr "Active Directory cun Winbind" #~ msgid "Active Directory with SFU:" #~ msgstr "Active Directory cun SFU:" #~ msgid "Active Directory with Winbind:" #~ msgstr "Active Directory cun Winbind:" #~ msgid "" #~ "Winbind allows the system to authenticate users in a Windows Active " #~ "Directory Server." #~ msgstr "" #~ "Winbind permitit a su sistema de autentigai umperadoris in d-unu Windows " #~ "Active Directory Server." #~ msgid "Authentication LDAP" #~ msgstr "Autentigadura LDAP" #~ msgid "TLS" #~ msgstr "TLS" #~ msgid "SSL" #~ msgstr "SSL" #~ msgid "security layout (SASL/Kerberos)" #~ msgstr "skema de siguresa (SASL/Kerberos)" #~ msgid "Authentication Active Directory" #~ msgstr "Autentigadura in Active Directory" #~ msgid "LDAP users database" #~ msgstr "Database de is umperadoris LDAP" #~ msgid "LDAP user allowed to browse the Active Directory" #~ msgstr "Umperadori LDAP autorisau a sfollyai sa Active Directory" #~ msgid "Authentication NIS" #~ msgstr "Autentigadura NIS" #~ msgid "Authentication Windows Domain" #~ msgstr "Autentigadura in Windows Domain" #~ msgid "Undo" #~ msgstr "No fatzas" #~ msgid "Save partition table" #~ msgstr "Sarva sa tàula de is pratziduras" #~ msgid "Restore partition table" #~ msgstr "Arrecasça sa tàula de is pratziduras" #~ msgid "" #~ "The backup partition table has not the same size\n" #~ "Still continue?" #~ msgstr "" #~ "Sa còpia de sa tàula de pratzidura no est manna uguali\n" #~ "Sigu a andai?" #~ msgid "Info: " #~ msgstr "Sceda: " #~ msgid "Unknown driver" #~ msgstr "Driver disconnotu" #~ msgid "Error reading file %s" #~ msgstr "Faddina ligendi su file %s" #~ msgid "Ext2" #~ msgstr "Ext2" #~ msgid "Journalised FS" #~ msgstr "Journalised FS" #~ msgid "Add user" #~ msgstr "Açungi umperadori" #~ msgid "Accept user" #~ msgstr "Aceta umperadori" #~ msgid "Supermount" #~ msgstr "Supermount" #~ msgid "Supermount except for CDROM drives" #~ msgstr "Supermount ma no po is trastus CDROM" #~ msgid "Rescue partition table" #~ msgstr "Arranja sa tàula de is pratziduras" #~ msgid "Removable media automounting" #~ msgstr "Càrrigu automàtigu mèdius arremoviditzus" #~ msgid "Trying to rescue partition table" #~ msgstr "Provu a sarvai sa tàula de pratzidura" #~ msgid "PLL setting:" #~ msgstr "Assètius PLL:" #~ msgid "Radio support:" #~ msgstr "Suportu arràdiu:"