/[smeserver]/rpms/e-smith-backup/sme7/e-smith-backup-1.14.0-restorefromdisk.patch
ViewVC logotype

Contents of /rpms/e-smith-backup/sme7/e-smith-backup-1.14.0-restorefromdisk.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Jun 12 15:12:37 2007 UTC (17 years, 4 months ago) by slords
Branch: MAIN
CVS Tags: e-smith-backup-1_14_0-16_el4_sme, e-smith-backup-1_14_0-20_el4_sme, e-smith-backup-1_14_0-15_el4_sme, e-smith-backup-1_14_0-25_el4_sme, e-smith-backup-1_14_0-26_el4_sme, e-smith-backup-1_14_0-23_el4_sme, e-smith-backup-1_14_0-24_el4_sme, e-smith-backup-1_14_0-21_el4_sme, e-smith-backup-1_14_0-22_el4_sme, e-smith-backup-1_14_0-14_el4_sme, e-smith-backup-1_14_0-17_el4_sme, e-smith-backup-1_14_0-19_el4_sme, e-smith-backup-1_14_0-18_el4_sme
Branch point for: e-smith-backup-1_14-tree
Import on branch sme7 of package e-smith-backup-1.14.0-14.el4.sme.src.rpm

1 diff -Nur -x '*.orig' -x '*.rej' e-smith-backup-1.14.0/root/etc/e-smith/events/actions/restore-from-disk mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/events/actions/restore-from-disk
2 --- e-smith-backup-1.14.0/root/etc/e-smith/events/actions/restore-from-disk 2006-03-14 10:08:45.000000000 -0700
3 +++ mezzanine_patched_e-smith-backup-1.14.0/root/etc/e-smith/events/actions/restore-from-disk 2007-01-18 08:56:02.000000000 -0700
4 @@ -35,7 +35,7 @@
5
6 exit 0 unless $program eq 'CopyFromDisk';
7
8 -die("Root path to restore from must be provided\n") unless defined $path;
9 +die("Root path to restore from must be provided\n") unless defined $path && -d $path;
10 chdir $path or die "Could not chdir to $path: $!";
11
12 my $backup_db = new esmith::Backup or die "Couldn't create Backup object\n";
13 @@ -45,12 +45,14 @@
14 die "Can't fork: $!" unless defined(my $pid = open(STDIN, "-|"));
15 if ($pid)
16 {
17 - # parent - copy files from $path to /
18 - exec("cpio", "-dump", "/");
19 + # parent - extract files to /
20 + exec(qw(tar -C / -xf -));
21 }
22 else
23 {
24 - # generate a set of pathnames under $path which are to be restored
25 - exec("find", @restore);
26 + # create archive from $path which are to be restored
27 + chroot($path) || die "Can't chroot to $path";
28 + open(STDERR, ">/dev/null");
29 + exec(qw(tar -C / -cf -), @restore);
30 }
31

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed