diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2012-01-04 18:54:06 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2012-01-04 18:54:06 -0200 |
commit | 1353450a26011ec5f7839f8e8626a099e4b26d21 (patch) | |
tree | c962e95e7874fba64eeb8c335b55ef65ef22b376 /share/hydractl/backports | |
parent | d3c35a86ed5b65abda550551dae914708ceda827 (diff) | |
download | hydra-1353450a26011ec5f7839f8e8626a099e4b26d21.tar.gz hydra-1353450a26011ec5f7839f8e8626a099e4b26d21.tar.bz2 |
Fixing backports subcommand
Diffstat (limited to 'share/hydractl/backports')
-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 |