diff options
Diffstat (limited to 'templates/show/log')
-rw-r--r-- | templates/show/log/image/node.def | 1 | ||||
-rw-r--r-- | templates/show/log/image/node.tag/all/node.def | 5 | ||||
-rw-r--r-- | templates/show/log/image/node.tag/authorization/node.def | 4 | ||||
-rw-r--r-- | templates/show/log/image/node.tag/directory/node.def | 4 | ||||
-rw-r--r-- | templates/show/log/image/node.tag/file/node.def | 2 | ||||
-rw-r--r-- | templates/show/log/image/node.tag/file/node.tag/node.def | 7 | ||||
-rw-r--r-- | templates/show/log/image/node.tag/node.def | 11 |
7 files changed, 34 insertions, 0 deletions
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 |