summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-02-04 11:20:43 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-02-04 11:20:43 +0000
commit31bc4d9569f2cc454ccb50cb6352b4afaa93c793 (patch)
tree274b52423c3c9c9e27740510650b49277991fb38 /perl-install/diskdrake
parent17d98fbb4f822dab6d3cfc90dc8e72a427a0dabf (diff)
downloaddrakx-backup-do-not-use-31bc4d9569f2cc454ccb50cb6352b4afaa93c793.tar
drakx-backup-do-not-use-31bc4d9569f2cc454ccb50cb6352b4afaa93c793.tar.gz
drakx-backup-do-not-use-31bc4d9569f2cc454ccb50cb6352b4afaa93c793.tar.bz2
drakx-backup-do-not-use-31bc4d9569f2cc454ccb50cb6352b4afaa93c793.tar.xz
drakx-backup-do-not-use-31bc4d9569f2cc454ccb50cb6352b4afaa93c793.zip
diskdrake: forget the changed label when the user cancels
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r--perl-install/diskdrake/interactive.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 838463204..e266d0443 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -611,18 +611,16 @@ sub Type {
sub Label {
my ($in, $_hd, $part) = @_;
- my $old_label = $part->{device_LABEL} || "";
+ my $new_label = $part->{device_LABEL} || "";
$in->ask_from(N("Set volume label"), N("Beware, this will be written to disk as soon as you validate!"),
[
{ label => N("Which volume label?"), title => 1 },
- { label => N("Label:"), val => \$part->{device_LABEL} } ]) or return;
+ { label => N("Label:"), val => \$new_label } ]) or return;
- if (!fs::format::check_package_is_installed_label($in->do_pkgs, $part->{fs_type})) {
- $part->{device_LABEL} = $old_label;
- return;
- }
- return if $old_label eq $part->{device_LABEL};
+ fs::format::check_package_is_installed_label($in->do_pkgs, $part->{fs_type}) or return;
+ return if $new_label eq $part->{device_LABEL};
+ $part->{device_LABEL} = $new_label;
$part->{device_LABEL_changed} = 1;
$part->{prefer_device_LABEL} = to_bool($part->{device_LABEL}) && !isLVM($part);
fs::format::clean_label($part);