summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/copy/files/node.def1
-rw-r--r--templates/copy/files/node.tag/node.def3
-rw-r--r--templates/copy/files/node.tag/to/node.def1
-rw-r--r--templates/copy/files/node.tag/to/node.tag/node.def4
-rw-r--r--templates/copy/node.def1
-rw-r--r--templates/delete/files/node.def1
-rw-r--r--templates/delete/files/node.tag/node.def4
-rw-r--r--templates/show/files/node.def2
-rw-r--r--templates/show/files/node.tag/node.def5
-rw-r--r--templates/show/log/image/node.def1
-rw-r--r--templates/show/log/image/node.tag/all/node.def5
-rw-r--r--templates/show/log/image/node.tag/authorization/node.def4
-rw-r--r--templates/show/log/image/node.tag/directory/node.def4
-rw-r--r--templates/show/log/image/node.tag/file/node.def2
-rw-r--r--templates/show/log/image/node.tag/file/node.tag/node.def7
-rw-r--r--templates/show/log/image/node.tag/node.def11
-rw-r--r--templates/update/config/node.def1
-rw-r--r--templates/update/config/node.tag/from/node.def1
-rw-r--r--templates/update/config/node.tag/from/node.tag/node.def10
-rw-r--r--templates/update/config/node.tag/node.def10
20 files changed, 75 insertions, 3 deletions
diff --git a/templates/copy/files/node.def b/templates/copy/files/node.def
new file mode 100644
index 0000000..e1b2447
--- /dev/null
+++ b/templates/copy/files/node.def
@@ -0,0 +1 @@
+help: Copy files
diff --git a/templates/copy/files/node.tag/node.def b/templates/copy/files/node.tag/node.def
new file mode 100644
index 0000000..8df0e7c
--- /dev/null
+++ b/templates/copy/files/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Directory to copy files from
+comptype: imagefiles
+allowed: echo -n "<imagefiles>"
diff --git a/templates/copy/files/node.tag/to/node.def b/templates/copy/files/node.tag/to/node.def
new file mode 100644
index 0000000..21f3ade
--- /dev/null
+++ b/templates/copy/files/node.tag/to/node.def
@@ -0,0 +1 @@
+help: Path to copy into
diff --git a/templates/copy/files/node.tag/to/node.tag/node.def b/templates/copy/files/node.tag/to/node.tag/node.def
new file mode 100644
index 0000000..751783b
--- /dev/null
+++ b/templates/copy/files/node.tag/to/node.tag/node.def
@@ -0,0 +1,4 @@
+help: Directory to copy files to
+comptype: imagefiles
+allowed: echo -n "<imagefiles>"
+run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --copy $3 $5
diff --git a/templates/copy/node.def b/templates/copy/node.def
new file mode 100644
index 0000000..9557b10
--- /dev/null
+++ b/templates/copy/node.def
@@ -0,0 +1 @@
+help: Copy data
diff --git a/templates/delete/files/node.def b/templates/delete/files/node.def
new file mode 100644
index 0000000..92c8f6c
--- /dev/null
+++ b/templates/delete/files/node.def
@@ -0,0 +1 @@
+help: Delete files in a particular image
diff --git a/templates/delete/files/node.tag/node.def b/templates/delete/files/node.tag/node.def
new file mode 100644
index 0000000..715ba48
--- /dev/null
+++ b/templates/delete/files/node.tag/node.def
@@ -0,0 +1,4 @@
+help: Delete files in the specified directory
+comptype: imagefiles
+allowed: echo -n "<imagefiles>"
+run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --delete=$3
diff --git a/templates/show/files/node.def b/templates/show/files/node.def
index 7f9efd0..a6c408d 100644
--- a/templates/show/files/node.def
+++ b/templates/show/files/node.def
@@ -1 +1 @@
-help: Show file information
+help: Show files for a particular image
diff --git a/templates/show/files/node.tag/node.def b/templates/show/files/node.tag/node.def
index 0448ad4..7e205da 100644
--- a/templates/show/files/node.tag/node.def
+++ b/templates/show/files/node.tag/node.def
@@ -1,3 +1,4 @@
help: Show files in the specified directory
-allowed: echo -n '<pathname>'
-run: ls -lh "$3"
+comptype: imagefiles
+allowed: echo -n "<imagefiles>"
+run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --show=$3
diff --git a/templates/show/log/image/node.def b/templates/show/log/image/node.def
new file mode 100644
index 0000000..60b0ab3
--- /dev/null
+++ b/templates/show/log/image/node.def
@@ -0,0 +1 @@
+help: Show logs from an image
diff --git a/templates/show/log/image/node.tag/all/node.def b/templates/show/log/image/node.tag/all/node.def
new file mode 100644
index 0000000..eb3c87c
--- /dev/null
+++ b/templates/show/log/image/node.tag/all/node.def
@@ -0,0 +1,5 @@
+help: Show contents of all master log files for image
+run: eval $(lesspipe)
+ less $_vyatta_less_options \
+ --prompt=".log?m, file %i of %m., page %dt of %D" \
+ -- `printf "%s\n" /live/image/boot/$4/live-rw/var/log/messages* | sort -nr`
diff --git a/templates/show/log/image/node.tag/authorization/node.def b/templates/show/log/image/node.tag/authorization/node.def
new file mode 100644
index 0000000..aec45cc
--- /dev/null
+++ b/templates/show/log/image/node.tag/authorization/node.def
@@ -0,0 +1,4 @@
+help: Show listing of authorization attempts for image
+run: less $_vyatta_less_options \
+ --prompt=".log, page %dt of %D" \
+ -- /live/image/boot/$4/live-rw/var/log/auth.log
diff --git a/templates/show/log/image/node.tag/directory/node.def b/templates/show/log/image/node.tag/directory/node.def
new file mode 100644
index 0000000..d9cb9cb
--- /dev/null
+++ b/templates/show/log/image/node.tag/directory/node.def
@@ -0,0 +1,4 @@
+help: Show listing of user-defined log files for image
+run: if [ -d /live/image/boot/$4/live-rw/var/log/user ]
+ then ls /live/image/boot/$4/live-rw/var/log/user
+ fi
diff --git a/templates/show/log/image/node.tag/file/node.def b/templates/show/log/image/node.tag/file/node.def
new file mode 100644
index 0000000..cad207b
--- /dev/null
+++ b/templates/show/log/image/node.tag/file/node.def
@@ -0,0 +1,2 @@
+help: Show contents of user-defined log file for image
+
diff --git a/templates/show/log/image/node.tag/file/node.tag/node.def b/templates/show/log/image/node.tag/file/node.tag/node.def
new file mode 100644
index 0000000..41c170d
--- /dev/null
+++ b/templates/show/log/image/node.tag/file/node.tag/node.def
@@ -0,0 +1,7 @@
+help: Show contents of specified user-defined log file for image
+allowed: local -a array ;
+ array=( /live/image/boot/$4/live-rw/var/log/user/* ) ;
+ [ ${#array[@]} -gt 0 ] && echo -n ${array[@]##*/} || echo -n none
+run: less $_vyatta_less_options \
+ --prompt=".$4 log, page %dt of %D" \
+ -- /live/image/boot/$4/live-rw/var/log/user/$5
diff --git a/templates/show/log/image/node.tag/node.def b/templates/show/log/image/node.tag/node.def
new file mode 100644
index 0000000..daeb44e
--- /dev/null
+++ b/templates/show/log/image/node.tag/node.def
@@ -0,0 +1,11 @@
+help: Show contents of master log file for image
+allowed: reply=( $(compgen -f /live/image/boot/ | grep -v grub) )
+ for i in `seq 0 $[${#reply[@]}-1]`; do
+ file=${reply[$i]}
+ reply[$i]=${file/#\/live\/image\/boot\//}
+ done
+ echo "${reply[*]}"
+
+run: less $_vyatta_less_options \
+ --prompt=".log, page %dt of %D" \
+ -- /live/image/boot/$4/live-rw/var/log/messages
diff --git a/templates/update/config/node.def b/templates/update/config/node.def
new file mode 100644
index 0000000..4bf41da
--- /dev/null
+++ b/templates/update/config/node.def
@@ -0,0 +1 @@
+help: Update image config
diff --git a/templates/update/config/node.tag/from/node.def b/templates/update/config/node.tag/from/node.def
new file mode 100644
index 0000000..413f817
--- /dev/null
+++ b/templates/update/config/node.tag/from/node.def
@@ -0,0 +1 @@
+help: Image to update from
diff --git a/templates/update/config/node.tag/from/node.tag/node.def b/templates/update/config/node.tag/from/node.tag/node.def
new file mode 100644
index 0000000..d540b9c
--- /dev/null
+++ b/templates/update/config/node.tag/from/node.tag/node.def
@@ -0,0 +1,10 @@
+help: Image to update from
+allowed: reply=( $(compgen -f /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://" )
+ echo "${reply[*]}"
+run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --update $3 $5
diff --git a/templates/update/config/node.tag/node.def b/templates/update/config/node.tag/node.def
new file mode 100644
index 0000000..8a4a2eb
--- /dev/null
+++ b/templates/update/config/node.tag/node.def
@@ -0,0 +1,10 @@
+help: Image to update
+allowed: reply=( $(compgen -f /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://" )
+ echo "${reply[*]}"
+run: sudo ${vyatta_sbindir}/vyatta-image-tools.pl --updateone $3