diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ChangeLog | 8 | ||||
-rw-r--r-- | perl-install/detect_devices.pm | 6 | ||||
-rw-r--r-- | perl-install/fs.pm | 12 | ||||
-rw-r--r-- | perl-install/install_any.pm | 8 | ||||
-rw-r--r-- | perl-install/printer.pm | 7 | ||||
-rw-r--r-- | perl-install/printerdrake.pm | 2 |
6 files changed, 35 insertions, 8 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index 3ea557f88..87d13abd0 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,11 @@ +2000-03-20 François Pons <fpons@mandrakesoft.com> + + * detect_devices.pm, fs.pm, install_any.pm: added supports for + LS-120 floppy drive and icons on desktop of KDE (untested). + * printer.pm, printerdrake.pm: added supports for PPA interface in + new rhs-printfilters, always enable "Print text as postscript" + option for such printers. + 2000-03-20 Pablo Saratxaga <pablo@mandrakesoft.com> * keyboard.pm: changed XKB name for Swedish keyboard diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 2be192599..8207dadfa 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -36,6 +36,7 @@ sub get { sub hds() { grep { $_->{type} eq 'hd' && ($::isStandalone || !isRemovableDrive($_)) } get(); } sub zips() { grep { $_->{type} eq 'hd' && isZipDrive($_) } get(); } #-sub jazzs() { grep { $_->{type} eq 'hd' && isJazDrive($_) } get(); } +sub ls120s() { grep { $_->{type} =~ /.d/ && isLS120Drive($_) } get(); } sub cdroms() { my @l = grep { $_->{type} eq 'cdrom' } get(); if (my @l2 = getIDEBurners()) { @@ -57,7 +58,8 @@ sub floppies() { sub isZipDrive() { $_[0]->{info} =~ /ZIP\s+\d+/ } #- accept ZIP 100, untested for bigger ZIP drive. #-sub isJazzDrive() { $_[0]->{info} =~ /JAZZ?\s+/ } #- untested. -sub isRemovableDrive() { &isZipDrive } #-or &isJazzDrive } +sub isLS120Drive() { $_[0]->{info} =~ /LS-?120/ } #- accept ZIP 100, untested for bigger ZIP drive. +sub isRemovableDrive() { &isZipDrive || &isLS120Drive } #-or &isJazzDrive } sub hasSCSI() { local *F; @@ -86,7 +88,7 @@ sub getSCSI() { $_ = <F>; my ($vendor, $model) = /^\s*Vendor:\s*(.*?)\s+Model:\s*(.*?)\s+Rev:/ or return &$err(); $_ = <F>; my ($type) = /^\s*Type:\s*(.*)/ or &$err(); my $device; - if ($type =~ /Direct-Access/) { + if ($type =~ /Direct-Access/) { #- what about LS-120 floppy drive, assuming there are Direct-Access... $type = 'hd'; $device = "sd" . chr($driveNum++ + ord('a')); } elsif ($type =~ /Sequential-Access/) { diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 855fb5fd0..ed88ea3ee 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -307,14 +307,22 @@ sub write($$$$) { [ "/mnt/cdrom$i", "/mnt/cdrom$i", "supermount", "fs=iso9660,dev=/dev/cdrom$i", 0, 0 ] : [ "/dev/cdrom$i", "/mnt/cdrom$i", "auto", "user,noauto,nosuid,exec,nodev,ro", 0, 0 ]; } detect_devices::cdroms()), - (map_index { #- for zip drives, the right partition is the 4th. + (map_index { #- for zip drives, the right partition is the 4th by default. my $i = $::i ? $::i + 1 : ''; mkdir "$prefix/mnt/zip$i", 0755 or log::l("failed to mkdir $prefix/mnt/zip$i: $!"); symlinkf "$_->{device}4", "$prefix/dev/zip$i" or log::l("failed to symlink $prefix/dev/zip$i: $!"); $useSupermount ? [ "/mnt/zip$i", "/mnt/zip$i", "supermount", "fs=vfat,dev=/dev/zip$i", 0, 0 ] : [ "/dev/zip$i", "/mnt/zip$i", "auto", "user,noauto,nosuid,exec,nodev", 0, 0 ]; - } detect_devices::zips())); + } detect_devices::zips()), + (map_index { #- for LS-120 drives, there are no partitions by default. + my $i = $::i ? $::i + 1 : ''; + mkdir "$prefix/mnt/floppy-ls$i", 0755 or log::l("failed to mkdir $prefix/mnt/floppy-ls$i: $!"); + symlinkf $_->{device}, "$prefix/dev/floppy-ls$i" or log::l("failed to symlink $prefix/dev/floppy-ls$i: $!"); + $useSupermount ? + [ "/mnt/floppy-ls$i", "/mnt/floppy-ls$i", "supermount", "fs=vfat,dev=/dev/floppy-ls$i", 0, 0 ] : + [ "/dev/floppy-ls$i", "/mnt/floppy-ls$i", "auto", "user,noauto,nosuid,exec,nodev", 0, 0 ]; + } detect_devices::ls120s())); write_fstab($fstab, $prefix, @to_add); } diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 382e13c78..321c6731a 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -679,6 +679,10 @@ sub kdeicons_postinstall($) { my %toreplace = ( device => $1, id => $2 ); template2userfile($prefix, "/usr/share/zip.fsdev.kdelnk.in", "Desktop/Zip". ($2 && " $2") .".kdelnk", 1, %toreplace); + } elsif (m|^/dev/(\S+)\s+/mnt/floppy-ls(\d*)\s+|) { + my %toreplace = ( device => $1, id => $2 ); + template2userfile($prefix, "/usr/share/floppy.fsdev.kdelnk.in", "Desktop/LS-120". ($2 && " $2") .".kdelnk", + 1, %toreplace); } elsif (m|^/dev/(\S+)\s+/mnt/floppy(\d*)\s+|) { my %toreplace = ( device => $1, id => $2 ); template2userfile($prefix, "/usr/share/floppy.fsdev.kdelnk.in", "Desktop/Floppy". ($2 && " $2") .".kdelnk", @@ -691,6 +695,10 @@ sub kdeicons_postinstall($) { my %toreplace = ( id => $1 ); template2userfile($prefix, "/usr/share/zip.kdelnk.in", "Desktop/Zip". ($1 && " $1") .".kdelnk", 1, %toreplace); + } elsif (m|^/mnt/floppy-ls(\d*)\s+/mnt/floppy-ls\d*\s+supermount|) { + my %toreplace = ( id => $1 ); + template2userfile($prefix, "/usr/share/floppy.kdelnk.in", "Desktop/LS-120". ($1 && " $1") .".kdelnk", + 1, %toreplace); } elsif (m|^/mnt/floppy(\d*)\s+/mnt/floppy\d*\s+supermount|) { my %toreplace = ( id => $1 ); template2userfile($prefix, "/usr/share/floppy.kdelnk.in", "Desktop/Floppy". ($1 && " $1") .".kdelnk", diff --git a/perl-install/printer.pm b/perl-install/printer.pm index 68127f0ff..34a20336d 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -337,9 +337,10 @@ sub read_printer_db(;$) { @available_devices{split /\s+/, $_} = () if /^\s+/; } } + close AVAIL; + $available_devices{ppa} = undef if -x "$prefix/usr/bin/pbm2ppa" && -x "$prefix/usr/bin/pnm2ppa"; delete $available_devices{''}; @available_devices{qw/POSTSCRIPT TEXT/} = (); #- these are always available. - close AVAIL; local $_; #- use of while (<... local *DBPATH; #- don't have to do close ... and don't modify globals at least @@ -589,8 +590,8 @@ sub configure_queue($) { #- make general.cfg ($filein, $file) = &$get_name_file("general.cfg"); - $fieldname{ascps_trans} = $entry->{ASCII_TO_PS} ? "YES" : "NO"; - $fieldname{desiredto} = ($dbentry->{GSDRIVER} ne "TEXT") ? "ps" : "asc"; + $fieldname{ascps_trans} = $entry->{ASCII_TO_PS} || $dbentry->{GSDRIVER} eq 'ppa' ? "YES" : "NO"; + $fieldname{desiredto} = $dbentry->{GSDRIVER} ne "TEXT" ? "ps" : "asc"; $fieldname{papersize} = $entry->{PAPERSIZE} ? $entry->{PAPERSIZE} : "letter"; $fieldname{printertype} = $entry->{TYPE}; create_config_file($filein, $file, %fieldname); diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 9bf53776d..50b0fb4e4 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -158,7 +158,7 @@ _("Resolution") => { val => \$printer->{RESOLUTION}, type => 'list', not_edit => $is_uniprint ? ( _("Uniprint driver options") => { val => \$printer->{BITSPERPIXEL}, type => 'list', not_edit => 1, list => \@col } ) : ( _("Color depth options") => { val => \$printer->{BITSPERPIXEL}, type => 'list', not_edit => 1, list => \@col } ), ) : (), -$db_entry{GSDRIVER} ne 'TEXT' && $db_entry{GSDRIVER} ne 'POSTSCRIPT' ? ( +$db_entry{GSDRIVER} ne 'TEXT' && $db_entry{GSDRIVER} ne 'POSTSCRIPT' && $db_entry{GSDRIVER} ne 'ppa' ? ( _("Print text as PostScript?") => { val => \$printer->{ASCII_TO_PS}, type => 'bool' }, ) : (), _("Reverse page order") => { val => \$printer->{REVERSE_ORDER}, type => 'bool' }, $db_entry{GSDRIVER} ne 'POSTSCRIPT' ? ( |