diff options
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydractl/backports | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/share/hydractl/backports b/share/hydractl/backports index 61a7b88..44437dd 100755 --- a/share/hydractl/backports +++ b/share/hydractl/backports @@ -1,10 +1,13 @@ #!/bin/bash # -# Add backports to souces.list. +# Add backports to sources.list. # -# TODO: check backports key signature -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 +# Get distro codename. +DISTRO="`lsb_release -cs`" + +# Add backports reference if needed. +if ! grep -q -e "^deb http://backports.debian.org/debian" /etc/apt/sources.list; then + echo "deb http://backports.debian.org/debian-backports $DISTRO-backports main contrib non-free" >> /etc/apt/sources.list + apt-get update fi |