From 877e1c6a826ca8367c176882be410a588484cd1c Mon Sep 17 00:00:00 2001 From: John Southworth Date: Fri, 20 May 2011 18:08:48 -0500 Subject: only attempt to move the old /config dir if it exists when cloning a configuration --- scripts/vyatta-image-tools.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl index 034a676..4eaf7bb 100755 --- a/scripts/vyatta-image-tools.pl +++ b/scripts/vyatta-image-tools.pl @@ -184,7 +184,7 @@ sub update { . "Do you wish to continue?"; if (y_or_n("$msg")){ system("rm -rf $to/config.preclone"); - system("mv $to/config $to/config.preclone"); + system("mv $to/config $to/config.preclone") if ( -d "$to/config" ); rsync("$from/config", $to); } } -- cgit v1.2.3