summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-04-05 09:24:25 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-04-05 09:24:25 +0000
commit432f25c16c5067056b767f51243b9ddada214b2c (patch)
tree000224647e4d436406344f0e02bc8757e138b4c5 /perl-install/fsedit.pm
parent3a986222e04aaa08efd903894aa2679b9ccb2b16 (diff)
downloaddrakx-backup-do-not-use-432f25c16c5067056b767f51243b9ddada214b2c.tar
drakx-backup-do-not-use-432f25c16c5067056b767f51243b9ddada214b2c.tar.gz
drakx-backup-do-not-use-432f25c16c5067056b767f51243b9ddada214b2c.tar.bz2
drakx-backup-do-not-use-432f25c16c5067056b767f51243b9ddada214b2c.tar.xz
drakx-backup-do-not-use-432f25c16c5067056b767f51243b9ddada214b2c.zip
perl now handle cleanly utf8 string in exceptions, no need to die \N("...")
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm32
1 files changed, 16 insertions, 16 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index bb6348a6e..87c50de6d 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -510,8 +510,8 @@ sub get_root { &get_root_ || {} }
#- do this before modifying $part->{type}
sub check_type {
my ($type, $_hd, $part) = @_;
- isThisFs("jfs", { type => $type }) && $part->{size} < 16 << 11 and die \N("You can't use JFS for partitions smaller than 16MB");
- isThisFs("reiserfs", { type => $type }) && $part->{size} < 32 << 11 and die \N("You can't use ReiserFS for partitions smaller than 32MB");
+ isThisFs("jfs", { type => $type }) && $part->{size} < 16 << 11 and die N("You can't use JFS for partitions smaller than 16MB");
+ isThisFs("reiserfs", { type => $type }) && $part->{size} < 32 << 11 and die N("You can't use ReiserFS for partitions smaller than 32MB");
}
sub package_needed_for_partition_type {
@@ -530,28 +530,28 @@ sub check_mntpoint {
my ($mntpoint, $hd, $part, $all_hds) = @_;
$mntpoint eq '' || isSwap($part) || isNonMountable($part) and return;
- $mntpoint =~ m|^/| or die \N("Mount points must begin with a leading /");
- $mntpoint =~ m|[\x7f-\xff]| and cdie \N("Mount points should contain only alphanumerical characters");
- mntpoint2part($mntpoint, [ grep { $_ ne $part } get_really_all_fstab($all_hds) ]) and die \N("There is already a partition with mount point %s\n", $mntpoint);
+ $mntpoint =~ m|^/| or die N("Mount points must begin with a leading /");
+ $mntpoint =~ m|[\x7f-\xff]| and cdie N("Mount points should contain only alphanumerical characters");
+ mntpoint2part($mntpoint, [ grep { $_ ne $part } get_really_all_fstab($all_hds) ]) and die N("There is already a partition with mount point %s\n", $mntpoint);
- cdie \N("You've selected a software RAID partition as root (/).
+ cdie N("You've selected a software RAID partition as root (/).
No bootloader is able to handle this without a /boot partition.
Please be sure to add a /boot partition") if $mntpoint eq "/" && isRAID($part) && !has_mntpoint("/boot", $all_hds);
- die \N("You can't use a LVM Logical Volume for mount point %s", $mntpoint)
+ die N("You can't use a LVM Logical Volume for mount point %s", $mntpoint)
if $mntpoint eq '/boot' && isLVM($hd);
- cdie \N("You've selected a LVM Logical Volume as root (/).
+ cdie N("You've selected a LVM Logical Volume as root (/).
The bootloader is not able to handle this without a /boot partition.
Please be sure to add a /boot partition") if $mntpoint eq "/" && isLVM($part) && !has_mntpoint("/boot", $all_hds);
- cdie \N("You may not be able to install lilo (since lilo doesn't handle a LV on multiple PVs)")
+ cdie N("You may not be able to install lilo (since lilo doesn't handle a LV on multiple PVs)")
if 0; # arch() =~ /i.86/ && $mntpoint eq '/' && isLVM($hd) && @{$hd->{disks} || []} > 1;
- cdie \N("This directory should remain within the root filesystem")
+ cdie N("This directory should remain within the root filesystem")
if member($mntpoint, qw(/root));
- die \N("This directory should remain within the root filesystem")
+ die N("This directory should remain within the root filesystem")
if member($mntpoint, qw(/bin /dev /etc /lib /sbin /mnt));
- die \N("You need a true filesystem (ext2/ext3, reiserfs, xfs, or jfs) for this mount point\n")
+ die N("You need a true filesystem (ext2/ext3, reiserfs, xfs, or jfs) for this mount point\n")
if !isTrueFS($part) && member($mntpoint, qw(/ /home /tmp /usr /var));
- die \N("You can't use an encrypted file system for mount point %s", $mntpoint)
+ die N("You can't use an encrypted file system for mount point %s", $mntpoint)
if $part->{options} =~ /encrypted/ && member($mntpoint, qw(/ /usr /var /boot));
local $part->{mntpoint} = $mntpoint;
@@ -612,9 +612,9 @@ sub auto_allocate {
if ($before == listlength(get_all_fstab($all_hds))) {
# find out why auto_allocate failed
if (any { !has_mntpoint($_->{mntpoint}, $all_hds) } @$suggestions) {
- die \N("Not enough free space for auto-allocating");
+ die N("Not enough free space for auto-allocating");
} else {
- die \N("Nothing to do");
+ die N("Nothing to do");
}
}
}
@@ -710,7 +710,7 @@ sub move {
local (*F, *G);
sysopen F, $hd->{file}, 0 or die '';
- sysopen G, $hd2->{file}, 2 or die \N("Error opening %s for writing: %s", $hd2->{file}, $!);
+ sysopen G, $hd2->{file}, 2 or die N("Error opening %s for writing: %s", $hd2->{file}, $!);
my $base = $part1->{start};
my $base2 = $part2->{start};