Skip to content
Snippets Groups Projects
Commit e29f1a30 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Changed 50unattended-upgrades.ucf-dist existence check.

parent ec079100
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,13 @@
source /root/envsetup/global-conf.sh
# move 50unattended-upgrades conf if any
if ( ls /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist 2>&1 >/dev/null ); then
if [ -f /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist ]; then
mv /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist /etc/apt/apt.conf.d/50unattended-upgrades
fi
# update sources.list
rm -f /etc/apt/sources.list~
echo "Updating sources.list file."
echo "Updating /etc/apt/sources.list file."
cp sources16.list /etc/apt/sources.list
if ( rgrep '14.04' /etc/lsb-release >/dev/null ); then
sed -i 's@xenial@trusty@' /etc/apt/sources.list
......@@ -17,7 +17,7 @@ fi
# modify sources.list to use ubicast cache
if ( ! test -z ${APT_CACHE_HOST} ); then
if ( ! grep "${APT_CACHE_HOST}" /etc/apt/sources.list >/dev/null ); then
echo "Updating sources.list to use cache ${APT_CACHE_HOST}."
echo "Updating /etc/apt/sources.list to use cache ${APT_CACHE_HOST}."
sed -i "s@http://@http://${APT_CACHE_HOST}/@" /etc/apt/sources.list
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment