diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 2 | ||||
-rw-r--r-- | perl-install/fs.pm | 10 | ||||
-rw-r--r-- | perl-install/install_any.pm | 6 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 2 | ||||
-rw-r--r-- | perl-install/partition_table.pm | 11 |
5 files changed, 14 insertions, 17 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 57d4e6333..a7a0e4b83 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -767,7 +767,7 @@ sub install_grub { output "$prefix/boot/grub/device.map", join '', map { "($_) /dev/$bios2dev{$_}\n" } sort keys %bios2dev; } - my $bootIsReiser = isReiserfs(fsedit::get_root($fstab, 'boot')); + my $bootIsReiser = isThisFs("reiserfs", fsedit::get_root($fstab, 'boot')); my $file2grub = sub { my ($part, $file) = fsedit::file2part($prefix, $fstab, $_[0]); dev2grub($part->{device}, \%dev2bios) . $file; diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 8a2576d40..167b0b383 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -131,17 +131,17 @@ sub real_format_part { if (isExt2($part)) { push @options, "-F" if isLoopback($part); format_ext2($part->{device}, @options); - } elsif (isReiserfs($part)) { + } elsif (isThisFs("reiserfs", $part)) { format_reiserfs($part->{device}, @options, if_(c::kernel_version() =~ /^\Q2.2/, "-v", "1")); - } elsif (isXfs($part)) { + } elsif (isThisFs("xfs", $part)) { format_xfs($part->{device}, @options); - } elsif (isJfs($part)) { + } elsif (isThisFs("jfs", $part)) { format_jfs($part->{device}, @options); } elsif (isDos($part)) { format_dos($part->{device}, @options); } elsif (isWin($part)) { format_dos($part->{device}, @options, '-F', 32); - } elsif (isHFS($part)) { + } elsif (isThisFs('hfs', $part)) { format_hfs($part->{device}, @options, '-l', "Untitled"); } elsif (isAppleBootstrap($part)) { format_hfs($part->{device}, @options, '-l', "bootstrap"); @@ -418,7 +418,7 @@ sub write_fstab($;$$@) { isNfs($_) and $dir = '', $options = $_->{options} || $format_options->('ro,nosuid,rsize=8192,wsize=8192', 'iocharset'); isFat($_) and $options = $_->{options} || $format_options->("user,exec,umask=0", 'codepage', 'iocharset'); - #isReiserfs($_) && $_ == fsedit::get_root($fstab, 'boot') and add_options($options, "notail"); + #isThisFs("reiserfs", $_) && $_ == fsedit::get_root($fstab, 'boot') and add_options($options, "notail"); my $dev = isLoopback($_) ? ($_->{mntpoint} eq '/' ? "/initrd/loopfs$_->{loopback_file}" : loopback::file($_)) : diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index a59ed6f74..293dc20c1 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -333,9 +333,9 @@ sub setPackages { push @{$o->{default_packages}}, "raidtools" if $o->{raid} && !is_empty_array_ref($o->{raid}{raid}); push @{$o->{default_packages}}, "lvm" if -e '/etc/lvmtab'; push @{$o->{default_packages}}, "usbd" if modules::get_alias("usb-interface"); - push @{$o->{default_packages}}, "reiserfsprogs" if grep { isReiserfs($_) } @{$o->{fstab}}; - push @{$o->{default_packages}}, "xfsprogs" if grep { isXfs($_) } @{$o->{fstab}}; - push @{$o->{default_packages}}, "jfsprogs" if grep { isJfs($_) } @{$o->{fstab}}; + push @{$o->{default_packages}}, "reiserfsprogs" if grep { isThisFs("reiserfs", $_) } @{$o->{fstab}}; + push @{$o->{default_packages}}, "xfsprogs" if grep { isThisFs("xfs", $_) } @{$o->{fstab}}; + push @{$o->{default_packages}}, "jfsprogs" if grep { isThisFs("jfs", $_) } @{$o->{fstab}}; push @{$o->{default_packages}}, "alsa", "alsa-utils" if modules::get_alias("sound-slot-0") =~ /^snd-card-/; push @{$o->{default_packages}}, "imwheel" if $o->{mouse}{nbuttons} > 3; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 7a3fc31df..4bd4210ad 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -410,7 +410,7 @@ sub choosePartitionsToFormat { ({ text => $name2label->($e), type => 'bool', val => \$e->{toFormatTmp} - }, if_(!isLoopback($_) && !isReiserfs($_), { + }, if_(!isLoopback($_) && !isThisFs("reiserfs", $_), { text => $name2label->($e), type => 'bool', advanced => 1, disabled => sub { !$e->{toFormatTmp} }, val => \$e->{toFormatCheck} diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 4f42120ec..bda2de95b 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -6,7 +6,7 @@ package partition_table; # $Id$ @ISA = qw(Exporter); %EXPORT_TAGS = ( - types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isReiserfs isXfs isJfs isTrueFS isSwap isDos isWin isFat isSunOS isOtherAvailableFS isPrimary isNfs isSupermount isLVM isRAID isMDRAID isLVMBased isHFS isNT isMountableRW isNonMountable isApplePartMap isLoopback isApple isAppleBootstrap) ], + types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isFs isTrueFS isSwap isDos isWin isFat isSunOS isOtherAvailableFS isPrimary isNfs isSupermount isLVM isRAID isMDRAID isLVMBased isNT isMountableRW isNonMountable isApplePartMap isLoopback isApple isAppleBootstrap) ], ); @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; @@ -223,24 +223,21 @@ sub isMDRAID { $_[0]{device} =~ /^md/ } sub isLVMBased { $_[0]{LVMname} } sub isSwap($) { $type2fs{$_[0]{type}} eq 'swap' } sub isExt2($) { $type2fs{$_[0]{type}} eq 'ext2' } -sub isReiserfs($) { $type2fs{$_[0]{type}} eq 'reiserfs' } -sub isXfs($) { $type2fs{$_[0]{type}} eq 'xfs' } -sub isJfs($) { $type2fs{$_[0]{type}} eq 'jfs' } sub isDos($) { arch() !~ /^sparc/ && $ {{ 1=>1, 4=>1, 6=>1 }}{$_[0]{type}} } sub isWin($) { $ {{ 0xb=>1, 0xc=>1, 0xe=>1, 0x1b=>1, 0x1c=>1, 0x1e=>1 }}{$_[0]{type}} } sub isFat($) { isDos($_[0]) || isWin($_[0]) } sub isSunOS($) { arch() =~ /sparc/ && $ {{ 0x1=>1, 0x2=>1, 0x4=>1, 0x6=>1, 0x7=>1, 0x8=>1 }}{$_[0]{type}} } sub isSolaris($) { 0; } #- hack to search for getting the difference ? TODO -sub isOtherAvailableFS($) { isFat($_[0]) || isSunOS($_[0]) || isHFS($_[0]) } #- other OS that linux can access its filesystem +sub isOtherAvailableFS($) { isFat($_[0]) || isSunOS($_[0]) || isThisFs('hfs', $_[0]) } #- other OS that linux can access its filesystem sub isNfs($) { $_[0]{type} eq 'nfs' } #- small hack sub isNT($) { arch() !~ /^sparc/ && $_[0]{type} == 0x7 } sub isSupermount($) { $_[0]{type} eq 'supermount' } -sub isHFS($) { $type2fs{$_[0]{type}} eq 'hfs' } sub isApple($) { $type2fs{$_[0]{type}} eq 'apple' && defined $_[0]{isDriver} } sub isAppleBootstrap($) { $type2fs{$_[0]{type}} eq 'apple' && defined $_[0]{isBoot} } sub isHiddenMacPart { defined $_[0]{isMap} } sub isLoopback { defined $_[0]{loopback_file} } -sub isTrueFS { isExt2($_[0]) || isReiserfs($_[0]) || isXfs($_[0]) || isJfs($_[0]) } +sub isThisFs { $type2fs{$_[1]{type}} eq $_[0] } +sub isTrueFS { isExt2($_[0]) || isThisFs("reiserfs", $_[0]) || isThisFs("xfs", $_[0]) || isThisFs("jfs", $_[0]) } sub isMountableRW { isTrueFS($_[0]) || isOtherAvailableFS($_[0]) } sub isNonMountable { isRAID($_[0]) || isLVM($_[0]) } |