diff options
-rw-r--r-- | perl-install/install2.pm | 53 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 8 | ||||
-rw-r--r-- | perl-install/network.pm | 2 | ||||
-rw-r--r-- | perl-install/printer.pm | 13 |
4 files changed, 36 insertions, 40 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 8d1181316..8df3a9f49 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -41,8 +41,8 @@ my @installSteps = ( selectInstallClass => [ __("Select installation class"), 1, 1, 0 ], setupSCSI => [ __("Setup SCSI"), 1, 0, 0 ], selectPath => [ __("Choose install or upgrade"), 0, 0, 0, "selectInstallClass" ], - selectMouse => [ __("Configure mouse"), 1, 1, 0, "selectPath" ], - selectKeyboard => [ __("Choose your keyboard"), 1, 1, 1, "selectPath" ], + selectMouse => [ __("Configure mouse"), 1, 1, 1, "selectPath" ], + selectKeyboard => [ __("Choose your keyboard"), 1, 1, 0, "selectPath" ], partitionDisks => [ __("Setup filesystems"), 1, 0, 0, "selectPath" ], formatPartitions => [ __("Format partitions"), 1, -1, 0, "partitionDisks" ], choosePackages => [ __("Choose packages to install"), 1, 1, 1, "selectPath" ], @@ -146,30 +146,31 @@ $o = $::o = { #- GMT => 1, }, printer => { - want => 0, - complete => 0, - str_type => $printer::printer_type_default, - QUEUE => "lp", - SPOOLDIR => "/var/spool/lpd/lp", - DBENTRY => "PostScript", - PAPERSIZE => "legal", - CRLF => 0, - - DEVICE => "/dev/lp0", - - REMOTEHOST => "", - REMOTEQUEUE => "", - - NCPHOST => "printerservername", - NCPQUEUE => "queuename", - NCPUSER => "user", - NCPPASSWD => "pass", - - SMBHOST => "hostname", - SMBHOSTIP => "1.2.3.4", - SMBSHARE => "printername", - SMBUSER => "user", - SMBPASSWD => "passowrd", + want => 0, + complete => 0, + str_type => $printer::printer_type_default, + QUEUE => "lp", + SPOOLDIR => "/var/spool/lpd/lp", + DBENTRY => "PostScript", + PAPERSIZE => "legal", + CRLF => 0, + AUTOSENDEOF => 0, + + DEVICE => "/dev/lp0", + + REMOTEHOST => "", + REMOTEQUEUE => "", + + NCPHOST => "printerservername", + NCPQUEUE => "queuename", + NCPUSER => "user", + NCPPASSWD => "pass", + + SMBHOST => "hostname", + SMBHOSTIP => "1.2.3.4", + SMBSHARE => "printername", + SMBUSER => "user", + SMBPASSWD => "passowrd", SMBWORKGROUP => "AS3", }, #- superuser => { password => 'a', shell => '/bin/bash', realname => 'God' }, diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 3b5471588..a8f3d03c2 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -457,7 +457,6 @@ 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") { return if !$o->ask_from_entries_ref( _("SMB (Windows 9x/NT) Printer Options"), @@ -481,6 +480,7 @@ applicable user name, password, and workgroup information."), return 0; }, ); + install_any::pkg_install($o, 'samba') unless $::testing; } elsif ($o->{printer}{TYPE} eq "NCP") { return if !$o->ask_from_entries_ref(_("NetWare Printer Options"), _("To print to a NetWare printer, you need to provide the @@ -492,6 +492,7 @@ wish to access and any applicable user name and password."), [\$o->{printer}{NCPHOST}, \$o->{printer}{NCPQUEUE}, \$o->{printer}{NCPUSER}, {val => \$o->{printer}{NCPPASSWD}, hidden => 1}], ); + install_any::pkg_install($o, 'ncpfs') unless $::testing; } my $action; @@ -531,10 +532,11 @@ wish to access and any applicable user name and password."), $o->ask_from_entries_refH('', _("Printer options"), [ _("Paper Size") => { val => \$o->{printer}{PAPERSIZE}, type => 'list', , not_edit => !$::expert, list => \@printer::papersize_type }, -@list_res ? ( +_("Eject page after job?") => { val => \$o->{printer}{AUTOSENDEOF}, type => 'bool' }, +$#list_res > 0 ? ( _("Resolution") => { val => \$o->{printer}{RESOLUTION}, type => 'list', , not_edit => !$::expert, list => \@res } ) : (), _("Fix stair-stepping text?") => { val => \$o->{printer}{CRLF}, type => "bool" }, -@list_col ? ( +$#list_col > 0 ? ( $is_uniprint ? ( _("Uniprint driver options") => { val => \$o->{printer}{BITSPERPIXEL}, type => 'list', , not_edit => !$::expert, list => \@col } ) : ( _("Color depth options") => { val => \$o->{printer}{BITSPERPIXEL}, type => 'list', , not_edit => !$::expert, list => \@col } ), ) : () diff --git a/perl-install/network.pm b/perl-install/network.pm index c5d1b6a97..fa5b1f3e9 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -158,7 +158,7 @@ sub findIntf { $l; } #PAD \s* a la fin -my $ip_regexp = qr/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/; +my $ip_regexp = qr/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/; sub is_ip { my ($ip) = @_; return 0 unless $ip =~ $ip_regexp; diff --git a/perl-install/printer.pm b/perl-install/printer.pm index abc97e526..3e8350d45 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -419,19 +419,12 @@ sub configure_queue($) { %fieldname = (); $fieldname{gsdevice} = $dbentry->{GSDRIVER}; $fieldname{papersize} = $entry->{PAPERSIZE} ? $entry->{PAPERSIZE} : "letter"; - $fieldname{resolution} = $entry->{RESOLUTION}; #-($entry->{RESOLUTION} eq "Default") ? "Default" : ""; + $fieldname{resolution} = $entry->{RESOLUTION}; $fieldname{color} = $entry->{BITSPERPIXEL} ne "Default" && (($dbentry->{GSDRIVER} ne "uniprint" && "-dBitsPerPixel=") . $entry->{BITSPERPIXEL}); -#- do { -#- if ($dbentry->{GSDRIVER} ne "uniprint") { -#- ($entry->{BITSPERPIXEL} eq "Default") ? "-dBitsPerPixel=Default" : ""; -#- } else { -#- $entry->{BITSPERPIXEL}; -#- } -#- }; $fieldname{reversepages} = "NO"; $fieldname{extragsoptions} = ""; - $fieldname{pssendeof} = ($dbentry->{GSDRIVER} ne "POSTSCRIPT") ? "NO" : "YES"; + $fieldname{pssendeof} = $entry->{AUTOSENDEOF} ? ($dbentry->{GSDRIVER} eq "POSTSCRIPT" ? "YES" : "NO") : "NO"; $fieldname{nup} = "1"; $fieldname{rtlftmar} = "18"; $fieldname{topbotmar} = "18"; @@ -442,7 +435,7 @@ sub configure_queue($) { %fieldname = (); $fieldname{textonlyoptions} = ""; $fieldname{crlftrans} = $entry->{CRLF} ? "YES" : ""; - $fieldname{textsendeof} = ($dbentry->{GSDRIVER} eq "POSTSCRIPT") ? "NO" : "YES"; + $fieldname{textsendeof} = $entry->{AUTOSENDEOF} ? ($dbentry->{GSDRIVER} eq "POSTSCRIPT" ? "NO" : "YES") : "NO"; create_config_file($filein, $file, %fieldname); if ($entry->{TYPE} eq "SMB") { |