summaryrefslogtreecommitdiff
path: root/share/hydractl/backports
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydractl/backports')
-rwxr-xr-xshare/hydractl/backports12
1 files changed, 8 insertions, 4 deletions
diff --git a/share/hydractl/backports b/share/hydractl/backports
index dbf9ec1..9771d72 100755
--- a/share/hydractl/backports
+++ b/share/hydractl/backports
@@ -1,7 +1,11 @@
#!/bin/bash
+#
+# Add backports to souces.list.
+#
-# TODO: check debian version and if backports is enabled
# TODO: check backports key signature
-echo "deb http://www.backports.org/debian lenny-backports main contrib non-free" >> /etc/apt/sources.list
-apt-get update ; apt-get install debian-backports-keyring ; apt-get update
-apt-get -t lenny-backports install puppet puppetmaster
+if ! grep -q -e "^deb http://backports.debian.org/debian"; then
+ echo "deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free" >> /etc/apt/sources.list
+ apt-get update ; apt-get install debian-backports-keyring ; apt-get update
+ apt-get -t lenny-backports install puppet puppetmaster
+fi