diff --git a/3.New_server_deployment/3.APT_upgrade/0_setup.sh b/3.New_server_deployment/3.APT_upgrade/0_setup.sh index bc9c853abf11d392db601ecdb5a84e8f9ba2fad8..cc5d36118fc7b9a6b1c9155d3564c0a7a52a2666 100755 --- a/3.New_server_deployment/3.APT_upgrade/0_setup.sh +++ b/3.New_server_deployment/3.APT_upgrade/0_setup.sh @@ -13,15 +13,21 @@ if [ -f '/etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist' ]; then fi # update sources.list +if ( ! test -f '/etc/apt/sources.list.save' ); then + cp -a '/etc/apt/sources.list' '/etc/apt/sources.list.save' +fi rm -f /etc/apt/sources.list~ if ( lsb_release -a | grep 'Ubuntu' >/dev/null 2>&1 ); then - echo "Updating /etc/apt/sources.list file." - cp sources.list /etc/apt/sources.list + echo 'Updating /etc/apt/sources.list file.' + cp 'sources-ubu.list' '/etc/apt/sources.list' if ( lsb_release -a | grep '14.04' >/dev/null 2>&1 ); then sed -i 's@bionic@trusty@' /etc/apt/sources.list elif ( lsb_release -a | grep '16.04' >/dev/null 2>&1 ); then sed -i 's@bionic@xenial@' /etc/apt/sources.list fi +else + # Debian + cp 'sources-deb.list' '/etc/apt/sources.list' fi # modify sources.list to use ubicast cache diff --git a/3.New_server_deployment/3.APT_upgrade/sources-deb.list b/3.New_server_deployment/3.APT_upgrade/sources-deb.list new file mode 100644 index 0000000000000000000000000000000000000000..09940822f79666568dd15b4ead11c1f4e6ff12a5 --- /dev/null +++ b/3.New_server_deployment/3.APT_upgrade/sources-deb.list @@ -0,0 +1,5 @@ +deb http://ftp.debian.org/debian buster main contrib non-free + +deb http://ftp.debian.org/debian buster-updates main contrib non-free + +deb http://security.debian.org buster/updates main contrib non-free diff --git a/3.New_server_deployment/3.APT_upgrade/sources.list b/3.New_server_deployment/3.APT_upgrade/sources-ubu.list similarity index 92% rename from 3.New_server_deployment/3.APT_upgrade/sources.list rename to 3.New_server_deployment/3.APT_upgrade/sources-ubu.list index 06433ad75c9fcca5f3471b4ab6401d8e126a0a51..cc10e6e4eaf014df85e4bcf6f8c399924f4fbd28 100644 --- a/3.New_server_deployment/3.APT_upgrade/sources.list +++ b/3.New_server_deployment/3.APT_upgrade/sources-ubu.list @@ -1,4 +1,4 @@ deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse -deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse \ No newline at end of file +deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse