summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-10-20 17:01:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-10-20 17:01:30 +0000
commita35ac04f1ced9cf5130091f5ddf1eaa0329d5aff (patch)
tree62ebf78a4cca51a9ec05cec1eb0e40edf4c1c7f6 /rescue
parente8a7072ea3119f1b93527d9bdca720e80b699350 (diff)
downloaddrakx-backup-do-not-use-a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff.tar
drakx-backup-do-not-use-a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff.tar.gz
drakx-backup-do-not-use-a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff.tar.bz2
drakx-backup-do-not-use-a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff.tar.xz
drakx-backup-do-not-use-a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff.zip
add ability to keep existing /home (as requested by miura)
Diffstat (limited to 'rescue')
-rwxr-xr-xrescue/partimage_whole_disk11
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