Skip to content

Commit c1f1c9c

Browse files
committed
Add deprecation warning for Ubuntu Xenial (16.05) and other EOL distro versions
This adds a deprecation warning for distro versions that reached EOL, and for which we no longer maintain updates. Note that the list of versions for which we produce warnings is not "complete", and only contains versions that either reached EOL recently, or LTS versions that may still be commonly in use. With this patch; Running inside a fedora:32 container: DEPRECATION WARNING This Linux distribution (fedora 32) reached end-of-life and is no longer supported by this script. No updates or security fixes will be released for this distribution, and users are recommended to upgrade to a currently maintained version of fedora. Press Ctrl+C now to abort this script, or wait for the installation to continue. ^C Running inside an ubuntu:xenial container: DEPRECATION WARNING This Linux distribution (ubuntu xenial) reached end-of-life and is no longer supported by this script. No updates or security fixes will be released for this distribution, and users are recommended to upgrade to a currently maintained version of ubuntu. Press Ctrl+C now to abort this script, or wait for the installation to continue. ^C Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 1a7e2fb commit c1f1c9c

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

install.sh

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,14 @@ is_darwin() {
148148

149149
deprecation_notice() {
150150
distro=$1
151-
date=$2
151+
distro_version=$2
152152
echo
153-
echo "DEPRECATION WARNING:"
154-
echo " The distribution, $distro, will no longer be supported in this script as of $date."
155-
echo " If you feel this is a mistake please submit an issue at https://github.com/docker/docker-install/issues/new"
153+
printf "\033[91;1mDEPRECATION WARNING\033[0m\n"
154+
printf " This Linux distribution (\033[1m%s %s\033[0m) reached end-of-life and is no longer supported by this script.\n" "$distro" "$distro_version"
155+
echo " No updates or security fixes will be released for this distribution, and users are recommended"
156+
echo " to upgrade to a currently maintained version of $distro."
157+
echo
158+
printf "Press \033[1mCtrl+C\033[0m now to abort this script, or wait for the installation to continue."
156159
echo
157160
sleep 10
158161
}
@@ -366,6 +369,25 @@ do_install() {
366369
# Check if this is a forked Linux distro
367370
check_forked
368371

372+
# Print deprecation warnings for distro versions that recently reached EOL,
373+
# but may still be commonly used (especially LTS versions).
374+
case "$lsb_dist.$dist_version" in
375+
debian.stretch|debian.jessie)
376+
deprecation_notice "$lsb_dist" "$dist_version"
377+
;;
378+
raspbian.stretch|raspbian.jessie)
379+
deprecation_notice "$lsb_dist" "$dist_version"
380+
;;
381+
ubuntu.xenial|ubuntu.trusty)
382+
deprecation_notice "$lsb_dist" "$dist_version"
383+
;;
384+
fedora.*)
385+
if [ "$dist_version" -lt 33 ]; then
386+
deprecation_notice "$lsb_dist" "$dist_version"
387+
fi
388+
;;
389+
esac
390+
369391
# Run setup for each distro accordingly
370392
case "$lsb_dist" in
371393
ubuntu|debian|raspbian)

0 commit comments

Comments
 (0)