summaryrefslogtreecommitdiff
path: root/templates/system/package/repository/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/system/package/repository/node.def')
-rw-r--r--templates/system/package/repository/node.def32
1 files changed, 0 insertions, 32 deletions
diff --git a/templates/system/package/repository/node.def b/templates/system/package/repository/node.def
deleted file mode 100644
index c84060e2..00000000
--- a/templates/system/package/repository/node.def
+++ /dev/null
@@ -1,32 +0,0 @@
-tag:
-
-type: txt
-
-help: Debian archive name
-
-commit:expression: $VAR(./url/) != ""; "Must configure the repository URL"
-commit:expression: $VAR(./distribution/) != ""; "Must configure the repository distribution"
-commit:expression: $VAR(./components/) != ""; "Must configure the repository components"
-
-end:
- if [ ${COMMIT_ACTION} = 'SET' -o ${COMMIT_ACTION} = 'ACTIVE' ]; then
- if [ ${COMMIT_ACTION} = 'SET' ]; then
- echo "Adding new entry to /etc/apt/sources.list..."
- else
- echo "Updating /etc/apt/sources.list..."
- fi
- sudo bash -c "touch /etc/apt/sources.list && \
- sed -i '\\!# $VAR(@) #!d' /etc/apt/sources.list && \
- echo \"deb $VAR(url/@) $VAR(distribution/@) $VAR(components/@) # $VAR(@) #\" >> /tmp/$$-sources.list && \
- if [ $VAR(password/@) ] || [ $VAR(username/@) ]; \
- then \
- sed -i "s!://.*@!://!" /tmp/$$-sources.list; \
- sed -i "s!://!://$VAR(username/@):$VAR(password/@)@!" /tmp/$$-sources.list; \
- fi && \
- cat /tmp/$$-sources.list>>/etc/apt/sources.list ; \
- rm -f /tmp/$$-sources.list"
- elif [ ${COMMIT_ACTION} = 'DELETE' ]; then
- echo "Removing entry from /etc/apt/sources.list..."
- sudo sh -c "touch /etc/apt/sources.list && \
- sed -i '\\!# $VAR(@) #!d' /etc/apt/sources.list"
- fi