summaryrefslogtreecommitdiff
path: root/share/hydractl/dist-upgrade
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydractl/dist-upgrade')
-rwxr-xr-xshare/hydractl/dist-upgrade6
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