diff --git a/3.New_server_deployment/4.APT_upgrade/0_setup.sh b/3.New_server_deployment/4.APT_upgrade/0_setup.sh index 793ab1006f16baa12b3ee41f03eb2c9829737088..977382ab5c6f0163f7032ba48697cc6248f46078 100755 --- a/3.New_server_deployment/4.APT_upgrade/0_setup.sh +++ b/3.New_server_deployment/4.APT_upgrade/0_setup.sh @@ -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