From 254bcae16dceddec543f470ae2f20de91cf312fc Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 25 Mar 2016 18:21:03 -0300 Subject: Test for /etc/apt/preferences on system-upgrade --- share/hydractl/dist-upgrade | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'share/hydractl') 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 -- cgit v1.2.3