diff options
author | pad <pad@mandriva.com> | 1999-09-03 13:44:30 +0000 |
---|---|---|
committer | pad <pad@mandriva.com> | 1999-09-03 13:44:30 +0000 |
commit | 59a71876a17e616e3706c80cddf3e74f34bbcf67 (patch) | |
tree | e52f9979a37b9e3256a5f764d8c9f4cc85b9464f /perl-install/install_steps_interactive.pm | |
parent | 874f08a1316d73d6f09f0ca2df235dac495a387b (diff) | |
download | drakx-backup-do-not-use-59a71876a17e616e3706c80cddf3e74f34bbcf67.tar drakx-backup-do-not-use-59a71876a17e616e3706c80cddf3e74f34bbcf67.tar.gz drakx-backup-do-not-use-59a71876a17e616e3706c80cddf3e74f34bbcf67.tar.bz2 drakx-backup-do-not-use-59a71876a17e616e3706c80cddf3e74f34bbcf67.tar.xz drakx-backup-do-not-use-59a71876a17e616e3706c80cddf3e74f34bbcf67.zip |
pad stuff
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r-- | perl-install/install_steps_interactive.pm | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index cb279d352..5cf31678a 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -141,6 +141,72 @@ sub timeConfig { $o->SUPER::timeConfig($f); } +sub printerConfig($) { + my($o) = @_; + $o->{printer}{want} = + $o->ask_yesorno(_("Printer"), + _("Would you like to configure a printer?"), + $o->{printer}{want}); + return if !$o->{printer}{want}; + + #std info + #Don't wait, if the user enter something, you must remember it + #($o->{default}{printer}{QUEUE}, $o->{default}{printer}{SPOOLDIR}) = + $o->{printer}{QUEUE} ||= $o->{default}{printer}{QUEUE}; + $o->{printer}{SPOOLDIR} ||= $o->{default}{printer}{SPOOLDIR}; + $o->ask_from_entries_ref(_("Standard Printer Options"), + _("Every print queue (which print jobs are directed to) needs a + name (often lp) and a spool directory associated with it. What + name and directory should be used for this queue?"), + [_("Name of queue:"), _("Spool directory:")], + [\$o->{printer}{QUEUE}, \$o->{printer}{SPOOLDIR}], + ); + + $o->{printer}{str_type} = + $o->ask_from_list_(_("Select Printer Connection"), + _("How is the printer connected?"), + [keys %printer::printer_type], + ${$o->default("printer")}{str_type}, + ); + $o->{printer}{TYPE} = $printer::printer_type{$o->{printer}{str_type}}; + + if ($o->{printer}{TYPE} eq "LOCAL") { + eval { modules::load("lp"); }; + my @port = (); + foreach ("lp0", "lp1", "lp2") { + local *LP; + push @port, "/dev/$_" if open LP, ">/dev/$_" + } + eval { modules::unload("lp") }; + + my $string = _("What device is your printer connected to + (note that /dev/lp0 is equivalent to LPT1:)?\n"); + $string .= _("I detect :"); + $string .= join(", ", @port); + + + + + } elsif ($o->{printer}{TYPE} eq "REMOTE") { + } + + + +# $entry = +# do { +# +# } +# +# if ($type eq "local") { +# +# } + printer::set_prefix($o->{prefix}); + printer::read_printer_db(); + + $o->SUPER::printerConfig; +} + + sub createBootdisk { my ($o, $first_time) = @_; my @l = detect_devices::floppies(); |