diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-09-07 14:44:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-09-07 14:44:42 +0000 |
commit | b3763612f3c0a2196cd8f992db4e73bdf5c4c6dc (patch) | |
tree | 29b7f852f8c383b88e8cbca8d516190334f5d70f /rescue | |
parent | 25b773a0184f2d30d4b7462f174f253d26c9d8ff (diff) | |
download | drakx-backup-do-not-use-b3763612f3c0a2196cd8f992db4e73bdf5c4c6dc.tar drakx-backup-do-not-use-b3763612f3c0a2196cd8f992db4e73bdf5c4c6dc.tar.gz drakx-backup-do-not-use-b3763612f3c0a2196cd8f992db4e73bdf5c4c6dc.tar.bz2 drakx-backup-do-not-use-b3763612f3c0a2196cd8f992db4e73bdf5c4c6dc.tar.xz drakx-backup-do-not-use-b3763612f3c0a2196cd8f992db4e73bdf5c4c6dc.zip |
- install scsi and sata modules
- make save_home_directory optional (and is false by default)
Diffstat (limited to 'rescue')
-rwxr-xr-x | rescue/partimage_whole_disk | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/rescue/partimage_whole_disk b/rescue/partimage_whole_disk index a35c374ca..6a4ea0463 100755 --- a/rescue/partimage_whole_disk +++ b/rescue/partimage_whole_disk @@ -15,6 +15,8 @@ use Carp::Heavy; #- help getting the file in make_rescue_img BEGIN { partition_table::raw::default_type() } +my %options; + my ($server); if ($ARGV[0] eq '-s') { (undef, $server, @ARGV) = @ARGV; @@ -27,16 +29,18 @@ $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; $ENV{HOME} = '/'; log::openLog("/var/log/partimage_whole_disk.log"); my @partimage_cmd = ('partimage', if_($server, '-s', $server)); + +$action eq 'save_all' && @ARGV == 1 || + $action eq 'rest_all' && @ARGV or usage(); + +run_program::run('drvinst', 'STORAGE_SCSI', 'STORAGE_IDE'); + my $all_hds = fsedit::get_hds({}); if ($action eq 'save_all') { - @ARGV == 1 or usage(); save_all($ARGV[0]); } elsif ($action eq 'rest_all') { - @ARGV or usage(); rest_all(@ARGV); -} else { - usage(); } sub save_all { @@ -56,10 +60,12 @@ sub save_all { $_->{saved} = !member($_->{fs_type}, 'ntfs', 'vfat', 'swap'); } - #- shrink and don't save the last ext3 partition (which is the /home partition) - if (my $part = find { isTrueLocalFS($_) } reverse @$part_list) { - $part->{size} = min($part->{size}, 1024 * 1024 * 2); # not greater than 1GB - $part->{saved} = 0; + if ($options{save_home_directory}) { + #- shrink and don't save the last ext3 partition (which is the /home partition) + if (my $part = find { isTrueLocalFS($_) } reverse @$part_list) { + $part->{size} = min($part->{size}, 1024 * 1024 * 2); # not greater than 1GB + $part->{saved} = 0; + } } foreach (grep { $_->{saved} } @$part_list) { |