summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpad <pad@mandriva.com>1999-09-03 19:09:37 +0000
committerpad <pad@mandriva.com>1999-09-03 19:09:37 +0000
commitcbbd92b8597a4cd4698c453fd2cf622118043c56 (patch)
tree1285a9b54be1d7517e2ac6621182962ba5ae5fbd
parent7f2bd60493fd6a5830c5687d773007a3df74a914 (diff)
downloaddrakx-cbbd92b8597a4cd4698c453fd2cf622118043c56.tar
drakx-cbbd92b8597a4cd4698c453fd2cf622118043c56.tar.gz
drakx-cbbd92b8597a4cd4698c453fd2cf622118043c56.tar.bz2
drakx-cbbd92b8597a4cd4698c453fd2cf622118043c56.tar.xz
drakx-cbbd92b8597a4cd4698c453fd2cf622118043c56.zip
better printing support
-rw-r--r--perl-install/install2.pm18
-rw-r--r--perl-install/install_steps_interactive.pm53
-rw-r--r--perl-install/interactive.pm1
-rw-r--r--perl-install/interactive_gtk.pm2
-rw-r--r--perl-install/printer.pm4
5 files changed, 74 insertions, 4 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 9f416a957..50e6ddfea 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -250,6 +250,24 @@ my $default = {
DBENTRY => "DeskJet670",
PAPERSIZE => "legal",
CRLF => 0,
+
+ DEVICE => "/dev/dev1",
+
+ REMOTEHOST => "padhost",
+ REMOTEQUEUE => "padqueue",
+
+ NCPHOST => "printerservername",
+ NCPQUEUE => "queuename",
+ NCPUSER => "user",
+ NCPPASSWD => "pass",
+
+ SMBHOST => "hostname",
+ SMBHOSTIP => "1.2.3.4",
+ SMBSHARE => "printername",
+ SMBUSER => "user",
+ SMBPASSWD => "passowrd",
+ SMBWORKGROUP => "AS3",
+
},
# keyboard => 'de',
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 529693ddf..ed0a16fb1 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -18,7 +18,7 @@ use lang;
use keyboard;
use fs;
use log;
-
+use printer;
1;
sub errorInStep($$) {
@@ -195,9 +195,60 @@ sub printerConfig($) {
);
} elsif ($o->{printer}{TYPE} eq "REMOTE") {
+ $o->{printer}{REMOTEHOST} ||= $o->{default}{printer}{REMOTEHOST};
+ $o->{printer}{REMOTEQUEUE} ||= $o->{default}{printer}{REMOTEQUEUE};
+ $o->ask_from_entries_ref(_("Remote lpd Printer Options"),
+ _("To use a remote lpd print queue, you need to supply
+ the hostname of the printer server and the queue name
+ on that server which jobs should be placed in."),
+ [_("Remote hostname:"), _("Remote queue:")],
+ [\$o->{printer}{REMOTEHOST}, \$o->{printer}{REMOTEQUEUE}],
+ );
} elsif ($o->{printer}{TYPE} eq "SMB") {
+ $o->{printer}{SMBHOST} ||= $o->{default}{printer}{SMBHOST};
+ $o->{printer}{SMBHOSTIP} ||= $o->{default}{printer}{SMBHOSTIP};
+ $o->{printer}{SMBSHARE} ||= $o->{default}{printer}{SMBSHARE};
+ $o->{printer}{SMBUSER} ||= $o->{default}{printer}{SMBUSER};
+ $o->{printer}{SMBPASSWD} ||= $o->{default}{printer}{SMBPASSWD};
+ $o->{printer}{SMBWORKGROUP} ||= $o->{default}{printer}{SMBWORKGROUP};
+
+
+ $o->ask_from_entries_ref(_("SMB/Windows 95/NT Printer Options"),
+ _("To print to a SMB printer, you need to provide the
+ SMB host name (this is not always the same as the machines
+ TCP/IP hostname) and possibly the IP address of the print server, as
+ well as the share name for the printer you wish to access and any
+ applicable user name, password, and workgroup information."),
+ [_("SMB server host:"), _("SMB server IP:"),
+ _("Share name:"), _("User name:"), _("Password:"),
+ _("Workgroup:")],
+ [\$o->{printer}{SMBHOST}, \$o->{printer}{SMBHOSTIP},
+ \$o->{printer}{SMBSHARE}, \$o->{printer}{SMBUSER},
+ \$o->{printer}{SMBPASSWD}, \$o->{printer}{SMBWORKGROUP}
+ ]
+ );
+
+
+
} elsif ($o->{printer}{TYPE} eq "NCP") {
+ $o->{printer}{NCPHOST} ||= $o->{default}{printer}{NCPHOST};
+ $o->{printer}{NCPQUEUE} ||= $o->{default}{printer}{NCPQUEUE};
+ $o->{printer}{NCPUSER} ||= $o->{default}{printer}{NCPUSER};
+ $o->{printer}{NCPPASSWD} ||= $o->{default}{printer}{NCPPASSWD};
+
+
+ $o->ask_from_entries_ref(_("NetWare Printer Options"),
+ _("To print to a NetWare printer, you need to provide the
+ NetWare print server name (this is not always the same as the machines
+ TCP/IP hostname)
+ as well as the print queue name for the printer you wish to access and any
+ applicable user name and password."),
+ [_("Printer Server:"), _("Print Queue Name:"),
+ _("User name:"), _("Password:")],
+ [\$o->{printer}{NCPHOST}, \$o->{printer}{NCPQUEUE},
+ \$o->{printer}{NCPUSER}, \$o->{printer}{NCPPASSWD}],
+ );
}
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 7151f7a34..8ba93a4d9 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -1,3 +1,4 @@
+
package interactive;
use diagnostics;
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index fcebb2b08..7d5397ba1 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -84,7 +84,7 @@ sub ask_from_entries_refW {
};
$entry->signal_connect(changed => $update);
$entry->set_text(${$_[1]}) if ${$_[1]};
- $entry->set_visibility(0) if $_[0] =~ /password/;
+ $entry->set_visibility(0) if $_[0] =~ /password/i;
&$update;
[($_[0], $entry)];
} $l, $val;
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index a6aac75bf..b86e4de61 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -9,7 +9,7 @@ use vars qw(%thedb %printer_type %printer_type_inv @papersize_type);
# misc imports
########################################################################################
use Data::Dumper;
-
+use commands;
########################################################################################
# pixel imports
########################################################################################
@@ -342,7 +342,7 @@ sub copy_master_filter($) {
unless ($::testing) {
- cp($master_filter, $complete_path) or die "Can't copy $master_filter to $complete_path $!";
+ commands::cp($master_filter, $complete_path) or die "Can't copy $master_filter to $complete_path $!";
}