summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-07-05 10:48:27 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-07-05 10:48:27 -0500
commit999d4832fda535b5224b9b21004e4c734387d1fa (patch)
tree97fabab6ec7e80fc0d3434ba40b0a6d358eaf710
parentb79e099c6ad85d4a1b10707aa3adb8a20c15f72c (diff)
downloadvyatta-op-999d4832fda535b5224b9b21004e4c734387d1fa.tar.gz
vyatta-op-999d4832fda535b5224b9b21004e4c734387d1fa.zip
Bugfix 7277: Make clone system config consistent with the other image tools
-rwxr-xr-xscripts/vyatta-image-tools.pl6
-rw-r--r--templates/clone/system/config/node.tag/from/node.tag/node.def5
-rw-r--r--templates/clone/system/config/node.tag/node.def1
3 files changed, 5 insertions, 7 deletions
diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl
index 2973c3f..52c3ee5 100755
--- a/scripts/vyatta-image-tools.pl
+++ b/scripts/vyatta-image-tools.pl
@@ -24,7 +24,7 @@ if (@update){
update(@update);
}
if (defined($updateone)){
- update($updateone, "running://");
+ update($updateone, "running");
}
if (@copy){
copy(@copy);
@@ -169,12 +169,12 @@ sub copy {
sub update {
my ($to, $from) = @_;
my ($t_topdir, $f_topdir);
- ($f_topdir, $from) = conv_file($from);
+ ($f_topdir, $from) = conv_file("$from://");
if ($f_topdir eq 'url'){
print "Cannot clone from a url\n";
exit 1;
}
- ($t_topdir, $to) = conv_file($to);
+ ($t_topdir, $to) = conv_file("$to://");
if ($t_topdir eq 'running'){
print "Cannot clone to running\n";
exit 1;
diff --git a/templates/clone/system/config/node.tag/from/node.tag/node.def b/templates/clone/system/config/node.tag/from/node.tag/node.def
index d5d7f67..c244559 100644
--- a/templates/clone/system/config/node.tag/from/node.tag/node.def
+++ b/templates/clone/system/config/node.tag/from/node.tag/node.def
@@ -3,11 +3,10 @@ allowed: reply=( $(compgen -d /live/image/boot/ | grep -v grub) )
for i in `seq 0 $[${#reply[@]}-1]`; do
file=${reply[$i]}
reply[$i]=${file/#\/live\/image\/boot\//}
- reply[$i]="${reply[$i]}://"
done
- reply+=( "running://" )
+ reply+=( "running" )
if [[ -d /live/image/config ]];then
- reply+=( "disk-install://" )
+ reply+=( "disk-install" )
fi
echo "${reply[*]}"
run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ];
diff --git a/templates/clone/system/config/node.tag/node.def b/templates/clone/system/config/node.tag/node.def
index be028c9..6e6e340 100644
--- a/templates/clone/system/config/node.tag/node.def
+++ b/templates/clone/system/config/node.tag/node.def
@@ -3,7 +3,6 @@ allowed: reply=( $(compgen -d /live/image/boot/ | grep -v grub) )
for i in `seq 0 $[${#reply[@]}-1]`; do
file=${reply[$i]}
reply[$i]=${file/#\/live\/image\/boot\//}
- reply[$i]="${reply[$i]}://"
done
echo "${reply[*]}"
run: if [ "$VYATTA_USER_LEVEL_DIR" == "/opt/vyatta/etc/shell/level/admin" ];