summaryrefslogtreecommitdiff
path: root/templates/system/package
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/package
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/package')
-rw-r--r--templates/system/package/auto-sync/node.def15
-rw-r--r--templates/system/package/node.def1
-rw-r--r--templates/system/package/repository/node.def14
-rw-r--r--templates/system/package/repository/node.tag/component/node.def2
-rw-r--r--templates/system/package/repository/node.tag/description/node.def2
-rw-r--r--templates/system/package/repository/node.tag/url/node.def2
6 files changed, 36 insertions, 0 deletions
diff --git a/templates/system/package/auto-sync/node.def b/templates/system/package/auto-sync/node.def
new file mode 100644
index 00000000..59f3e1e4
--- /dev/null
+++ b/templates/system/package/auto-sync/node.def
@@ -0,0 +1,15 @@
+# this will set APT::Periodic::Update-Package-Lists in /etc/apt/apt.conf
+# apt.conf is in turn read by the apt cron file loacted in /etc/cron.daily/apt
+# the /etc/crontab file must have the daily line for daily to be run
+type: u32
+default: 1
+help: "Update the the repository cache every n days. 0 disables auto-update."
+syntax: $(@) >= 0 && $(@) < 32 ; "auto-sync must be between 0 and 32 days"
+create: "sh -c \"touch /etc/apt/apt.conf && \
+sed -i '/APT::Periodic::Update-Package-Lists*/d' /etc/apt/apt.conf && \
+echo \\\"APT::Periodic::Update-Package-Lists \\\"$(@)\\\";\\\" >> /etc/apt/apt.conf\" "
+update: "sh -c \"touch /etc/apt/apt.conf && \
+sed -i '/APT::Periodic::Update-Package-Lists*/d' /etc/apt/apt.conf && \
+echo \\\"APT::Periodic::Update-Package-Lists \\\"$(@)\\\";\\\" >> /etc/apt/apt.conf\" "
+delete: "sh -c \"touch /etc/apt/apt.conf && \
+sed -i '/APT::Periodic::Update-Package-Lists*/d' /etc/apt/apt.conf\" "
diff --git a/templates/system/package/node.def b/templates/system/package/node.def
new file mode 100644
index 00000000..ce185fa9
--- /dev/null
+++ b/templates/system/package/node.def
@@ -0,0 +1 @@
+help: "Package Update Repository Configuration"
diff --git a/templates/system/package/repository/node.def b/templates/system/package/repository/node.def
new file mode 100644
index 00000000..104089a9
--- /dev/null
+++ b/templates/system/package/repository/node.def
@@ -0,0 +1,14 @@
+tag:
+type: txt
+help: "Repository name"
+# bug 1847: remove the previous repo line before adding new line.
+# need to prohibit '!' in repo name (sed delimiter)
+syntax: pattern $(@) "^[^!]+$" ; "Do not use '!' in repository name"
+create: "sh -c \"touch /etc/apt/sources.list && \
+sed -i '\\!/ $(@) !d' /etc/apt/sources.list && \
+echo \\\"deb $(url/@)/ $(@) $(component/@)\\\" >> /etc/apt/sources.list\" "
+update: "sh -c \"touch /etc/apt/sources.list && \
+sed -i '\\!/ $(@) !d' /etc/apt/sources.list && \
+echo \\\"deb $(url/@)/ $(@) $(component/@)\\\" >> /etc/apt/sources.list\" "
+delete: "sh -c \"touch /etc/apt/sources.list && \
+sed -i '\\! $(@) $(component/@)!d' /etc/apt/sources.list\" "
diff --git a/templates/system/package/repository/node.tag/component/node.def b/templates/system/package/repository/node.tag/component/node.def
new file mode 100644
index 00000000..e87f88de
--- /dev/null
+++ b/templates/system/package/repository/node.tag/component/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: "Repository component names"
diff --git a/templates/system/package/repository/node.tag/description/node.def b/templates/system/package/repository/node.tag/description/node.def
new file mode 100644
index 00000000..9ce7dac6
--- /dev/null
+++ b/templates/system/package/repository/node.tag/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: "Repository description"
diff --git a/templates/system/package/repository/node.tag/url/node.def b/templates/system/package/repository/node.tag/url/node.def
new file mode 100644
index 00000000..0e304b91
--- /dev/null
+++ b/templates/system/package/repository/node.tag/url/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: "Repository URL"