diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-10-20 17:01:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-10-20 17:01:30 +0000 |
commit | a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff (patch) | |
tree | 62ebf78a4cca51a9ec05cec1eb0e40edf4c1c7f6 /rescue/partimage_whole_disk | |
parent | e8a7072ea3119f1b93527d9bdca720e80b699350 (diff) | |
download | drakx-a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff.tar drakx-a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff.tar.gz drakx-a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff.tar.bz2 drakx-a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff.tar.xz drakx-a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff.zip |
add ability to keep existing /home (as requested by miura)
Diffstat (limited to 'rescue/partimage_whole_disk')
-rwxr-xr-x | rescue/partimage_whole_disk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rescue/partimage_whole_disk b/rescue/partimage_whole_disk index dd17a2993..ff30d5a50 100755 --- a/rescue/partimage_whole_disk +++ b/rescue/partimage_whole_disk @@ -18,6 +18,7 @@ BEGIN { partition_table::raw::default_type() } my %options = ( save_home_directory => 1, empty_space_at_end_of_disk => 0, # 300 * 1024 * 2, # 300MB + ask_before_modifying_home => 0, ); my ($server); @@ -146,6 +147,16 @@ sub rest_all { #- grow the last ext3 partition if (my $part = find { isTrueLocalFS($_) } reverse @$part_list) { $part->{ratio} = 1; + + if ($options{ask_before_modifying_home}) { + print "\nkeep existing /home? (Y/n) "; + if (<STDIN> !~ /n/i) { + my $l = @$from_partimage > 1 ? $from_partimage : $created; + #- it was meant to be restored or formatted + my $p = pop @$l; + log::l("keeping existing /home: removing $p->{device}"); + } + } } #- write the partition table |