diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-03-25 18:21:03 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-03-25 18:21:03 -0300 |
commit | 254bcae16dceddec543f470ae2f20de91cf312fc (patch) | |
tree | 7b5395189baa276e257f52ba6293238ce7a5247a /share/hydractl | |
parent | 2b95c33948797c38d13930584349ac58b0b87e47 (diff) | |
download | hydra-254bcae16dceddec543f470ae2f20de91cf312fc.tar.gz hydra-254bcae16dceddec543f470ae2f20de91cf312fc.tar.bz2 |
Test for /etc/apt/preferences on system-upgrade
Diffstat (limited to 'share/hydractl')
-rwxr-xr-x | share/hydractl/dist-upgrade | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/share/hydractl/dist-upgrade b/share/hydractl/dist-upgrade index efe3bc4..cc08606 100755 --- a/share/hydractl/dist-upgrade +++ b/share/hydractl/dist-upgrade @@ -88,7 +88,11 @@ function hydra_system_upgrade_prepare { echo "" echo "Updating apt configuration..." sed -i -e "s/$release/$nextrelease/g" /etc/apt/sources.list - sed -i -e "s/$release/$nextrelease/g" /etc/apt/preferences + + if [ -e "/etc/apt/preferences" ]; then + sed -i -e "s/$release/$nextrelease/g" /etc/apt/preferences + fi + sed -i -e 's|^deb http://backports.debian.org/debian-backports|#deb http://backports.debian.org/debian-backports|' /etc/apt/sources.list # These will be generated by puppet and can be safely removed |