summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-06-28 12:51:49 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-06-28 12:51:49 -0500
commite0c3601ff8bbb8da057b7784bf096ca088012556 (patch)
tree9fcfeeb5ad0a424999f2f7cd8a13951ce2ffe41d
parentfba0824c88267e0c41efa36a4fde05c8ee5daa0a (diff)
downloadvyatta-op-e0c3601ff8bbb8da057b7784bf096ca088012556.tar.gz
vyatta-op-e0c3601ff8bbb8da057b7784bf096ca088012556.zip
Use proper directory for disk-installs. Do completion of directory names only in clone system config since disk installs will have other files in /live/image/boot
-rwxr-xr-xscripts/vyatta-image-tools.pl4
-rw-r--r--templates/clone/system/config/node.tag/from/node.tag/node.def2
-rw-r--r--templates/clone/system/config/node.tag/node.def2
3 files changed, 5 insertions, 3 deletions
diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl
index 067ab28..2973c3f 100755
--- a/scripts/vyatta-image-tools.pl
+++ b/scripts/vyatta-image-tools.pl
@@ -197,7 +197,9 @@ sub update {
if (y_or_n("$msg")){
system("rm -rf $to/config.preclone");
system("mv $to/config $to/config.preclone") if ( -d "$to/config" );
- if (rsync("$from/config", $to) > 0){
+ my $confdir="config";
+ $confdir="opt/vyatta/etc/config" if ( $f_topdir eq "disk-install" );
+ if (rsync("$from/$confdir", $to) > 0){
print "Clone Failed!\nRestoring old config\n";
system("mv $to/config.preclone $to/config");
}
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 6061efd..d5d7f67 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
@@ -1,5 +1,5 @@
help: Image to update from
-allowed: reply=( $(compgen -f /live/image/boot/ | grep -v grub) )
+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\//}
diff --git a/templates/clone/system/config/node.tag/node.def b/templates/clone/system/config/node.tag/node.def
index d4a04c0..be028c9 100644
--- a/templates/clone/system/config/node.tag/node.def
+++ b/templates/clone/system/config/node.tag/node.def
@@ -1,5 +1,5 @@
help: Image to update
-allowed: reply=( $(compgen -f /live/image/boot/ | grep -v grub) )
+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\//}