From d9832dce1221d63220d8127b697f6e9c7baa324b Mon Sep 17 00:00:00 2001 From: John Southworth Date: Thu, 9 Jun 2011 17:58:33 -0500 Subject: Fix clone so that it fails if a user attempts to clone to running:// --- scripts/vyatta-image-tools.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl index 79627bc..1fd139c 100755 --- a/scripts/vyatta-image-tools.pl +++ b/scripts/vyatta-image-tools.pl @@ -167,12 +167,16 @@ sub update { my ($t_topdir, $f_topdir); ($f_topdir, $from) = conv_file($from); if ($f_topdir eq 'url'){ - print "Cannot update from a url\n"; + print "Cannot clone from a url\n"; exit 1; } ($t_topdir, $to) = conv_file($to); - if ($f_topdir eq 'url'){ - print "Cannot update to a url\n"; + if ($t_topdir eq 'running'){ + print "Cannot clone to running\n"; + exit 1; + } + if ($t_topdir eq 'url'){ + print "Cannot clone to a url\n"; exit 1; } my $print_from = conv_file_to_rel($f_topdir, $from); -- cgit v1.2.3