From a35ac04f1ced9cf5130091f5ddf1eaa0329d5aff Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 20 Oct 2005 17:01:30 +0000 Subject: add ability to keep existing /home (as requested by miura) --- rescue/partimage_whole_disk | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'rescue/partimage_whole_disk') 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 ( !~ /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 -- cgit v1.2.1