diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-05-12 19:17:00 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-05-12 19:17:00 -0500 |
commit | ccefcb26ba4447a31bd4370eb26bd038d6ceaa3f (patch) | |
tree | 3ddc168fee9a7c6ebc46686e4accda7da791373b /scripts/vyatta-image-tools.pl | |
parent | 7af85b5060200de636a1a8779620dd1dc0b3c9eb (diff) | |
download | vyatta-op-ccefcb26ba4447a31bd4370eb26bd038d6ceaa3f.tar.gz vyatta-op-ccefcb26ba4447a31bd4370eb26bd038d6ceaa3f.zip |
Exclude white-out files from copy. Backup current config dir before clone
Diffstat (limited to 'scripts/vyatta-image-tools.pl')
-rwxr-xr-x | scripts/vyatta-image-tools.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl index e2dbba6..034a676 100755 --- a/scripts/vyatta-image-tools.pl +++ b/scripts/vyatta-image-tools.pl @@ -180,16 +180,18 @@ sub update { my $msg = "WARNING: This is a destructive copy of the /config directories\n" . "This will erase all data in the ".$print_to."config directory\n" . "This data will be replaced with the data from $print_from\n" + . "The current config data will be backed up in $print_to/config.preclone\n" . "Do you wish to continue?"; if (y_or_n("$msg")){ - system("rm -rf $to/config"); + system("rm -rf $to/config.preclone"); + system("mv $to/config $to/config.preclone"); rsync("$from/config", $to); } } sub rsync { my ($from,$to) = @_; - system("rsync -a --progress $from $to"); + system("rsync -a --progress --exclude '.wh.*' $from $to"); } sub curl_to { |