diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-06-09 17:58:33 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-06-09 17:58:33 -0500 |
commit | d9832dce1221d63220d8127b697f6e9c7baa324b (patch) | |
tree | 0ec8cee5e4747acc61660d8e4ffdcb65705a4922 /scripts | |
parent | 728876a902c93d42950d58a134e4875c81d0d1c9 (diff) | |
download | vyatta-op-d9832dce1221d63220d8127b697f6e9c7baa324b.tar.gz vyatta-op-d9832dce1221d63220d8127b697f6e9c7baa324b.zip |
Fix clone so that it fails if a user attempts to clone to running://
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-image-tools.pl | 10 |
1 files 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); |