diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-03-19 12:59:58 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-03-19 12:59:58 -0300 |
commit | e40b3514e041a4bb2aac962b639c947333365b4b (patch) | |
tree | 7439d05c58ead1e440e0375b87135e32f4b4a50a /share/hydractl/system-upgrade | |
parent | 427e9fc7722459041fbef65ef5e0fd00c43ea110 (diff) | |
download | hydra-e40b3514e041a4bb2aac962b639c947333365b4b.tar.gz hydra-e40b3514e041a4bb2aac962b639c947333365b4b.tar.bz2 |
Additional checks at puppet-enable and system-upgrade
Diffstat (limited to 'share/hydractl/system-upgrade')
-rwxr-xr-x | share/hydractl/system-upgrade | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/share/hydractl/system-upgrade b/share/hydractl/system-upgrade index a8fd13e..374a3b0 100755 --- a/share/hydractl/system-upgrade +++ b/share/hydractl/system-upgrade @@ -85,9 +85,12 @@ 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 sed -i -e 's|^deb http://backports.debian.org/debian-backports|#deb http://backports.debian.org/debian-backports|' /etc/apt/sources.list + if [ -e "/etc/apt/preferences" ]; then + sed -i -e "s/$release/$nextrelease/g" /etc/apt/preferences + fi + # These will be generated by puppet and can be safely removed rm -f /etc/apt/sources.list.d/* rm -f /etc/apt/preferences.d/* |