summaryrefslogtreecommitdiff
path: root/templates/system/syslog/file
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@sydney.vyatta.com>2007-10-19 11:26:15 -0700
committerAn-Cheng Huang <ancheng@sydney.vyatta.com>2007-10-19 11:26:15 -0700
commit07183520f3f4d2f89e526055db418046d0d2450f (patch)
tree7968eac48a0a57ff97ec4769d999bf31348a2a12 /templates/system/syslog/file
parent66b621cf7759c3448ae8bfe7d7479fb13ea04b65 (diff)
downloadvyatta-cfg-quagga-07183520f3f4d2f89e526055db418046d0d2450f.tar.gz
vyatta-cfg-quagga-07183520f3f4d2f89e526055db418046d0d2450f.zip
move "system" configuration templates/scripts from vyatta-cfg.
Diffstat (limited to 'templates/system/syslog/file')
-rw-r--r--templates/system/syslog/file/node.def4
-rw-r--r--templates/system/syslog/file/node.tag/archive/files/node.def3
-rw-r--r--templates/system/syslog/file/node.tag/archive/node.def8
-rw-r--r--templates/system/syslog/file/node.tag/archive/size/node.def3
-rw-r--r--templates/system/syslog/file/node.tag/facility/node.def13
-rw-r--r--templates/system/syslog/file/node.tag/facility/node.tag/level/node.def3
6 files changed, 34 insertions, 0 deletions
diff --git a/templates/system/syslog/file/node.def b/templates/system/syslog/file/node.def
new file mode 100644
index 00000000..d62d2614
--- /dev/null
+++ b/templates/system/syslog/file/node.def
@@ -0,0 +1,4 @@
+tag:
+type: txt
+help: "Name of the syslog file to save log messages to"
+syntax: pattern $(@) "^[-a-zA-Z0-9_.]+$" ; "invalid file name $(@)"
diff --git a/templates/system/syslog/file/node.tag/archive/files/node.def b/templates/system/syslog/file/node.tag/archive/files/node.def
new file mode 100644
index 00000000..ca2bf175
--- /dev/null
+++ b/templates/system/syslog/file/node.tag/archive/files/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: "Number of saved files"
+default: 5
diff --git a/templates/system/syslog/file/node.tag/archive/node.def b/templates/system/syslog/file/node.tag/archive/node.def
new file mode 100644
index 00000000..d0b0e230
--- /dev/null
+++ b/templates/system/syslog/file/node.tag/archive/node.def
@@ -0,0 +1,8 @@
+help: "Configure log file size and rotation characteristics"
+# need mandatory files & size
+create: "sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \
+'$(../@)' '$(files/@)' '$(size/@)' 1\" "
+update: "sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \
+'$(../@)' '$(files/@)' '$(size/@)' 1\" "
+delete: "sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \
+'$(../@)' '$(files/@)' '$(size/@)' 0\" "
diff --git a/templates/system/syslog/file/node.tag/archive/size/node.def b/templates/system/syslog/file/node.tag/archive/size/node.def
new file mode 100644
index 00000000..a5ace52e
--- /dev/null
+++ b/templates/system/syslog/file/node.tag/archive/size/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: "Size of log files (kbytes)"
+default: 0
diff --git a/templates/system/syslog/file/node.tag/facility/node.def b/templates/system/syslog/file/node.tag/facility/node.def
new file mode 100644
index 00000000..3ef56e35
--- /dev/null
+++ b/templates/system/syslog/file/node.tag/facility/node.def
@@ -0,0 +1,13 @@
+tag:
+type: txt
+help: "Configure facility for file logging"
+create: "sh -c \"LVL=`echo -n $(level/@) | tr '[a-z]' '[A-Z]'` && \
+/opt/vyatta/sbin/vyatta_update_syslog.pl '$(@)\\.' \
+'\\/var\\/log\\/user\\/$(../@)' \
+\\\"$(@).\\\\\$LVL\t/var/log/user/$(../@) \n\\\"\" "
+update: "sh -c \"LVL=`echo -n $(level/@) | tr '[a-z]' '[A-Z]'` && \
+/opt/vyatta/sbin/vyatta_update_syslog.pl '$(@)\\.' \
+'\\/var\\/log\\/user\\/$(../@)' \
+\\\"$(@).\\\\\$LVL\t/var/log/user/$(../@) \n\\\"\" "
+delete: "sh -c \"/opt/vyatta/sbin/vyatta_update_syslog.pl '$(@)\\.' \
+'\\/var\\/log\\/user\\/$(../@)' ''\" "
diff --git a/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def b/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def
new file mode 100644
index 00000000..9be459c6
--- /dev/null
+++ b/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: "Configure the logging level"
+default: "err"