From 37d7cd2418aa3d94b2a7c24a66ddd679cdb1d815 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Fri, 27 Dec 2024 09:11:25 -0600 Subject: [PATCH] Update OS check - Add a check for Ubuntu 24.10, which is not currently supported by this project. You may instead use e.g. Ubuntu 24.04 LTS. - Cleanup --- extras/ikev2setup.sh | 12 ++++++++++-- extras/vpnupgrade.sh | 10 +++++++++- extras/vpnupgrade_ubuntu.sh | 10 +++++++++- vpnsetup.sh | 10 +++++++++- vpnsetup_ubuntu.sh | 10 +++++++++- 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/extras/ikev2setup.sh b/extras/ikev2setup.sh index 9ae8a38c9e..03c5b74bc1 100755 --- a/extras/ikev2setup.sh +++ b/extras/ikev2setup.sh @@ -105,11 +105,19 @@ EOF fi else os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9') - if [ "$os_ver" = 8 ] || [ "$os_ver" = 9 ] || [ "$os_ver" = "jessiesid" ] \ + if [ "$os_ver" = 8 ] || [ "$os_ver" = 9 ] || [ "$os_ver" = "stretchsid" ] \ || [ "$os_ver" = "bustersid" ]; then cat 1>&2 <= 10 or Ubuntu >= 20.04. This version of Ubuntu/Debian is too old and not supported. +EOF + exit 1 + fi + if [ "$os_ver" = "trixiesid" ] && [ -f /etc/os-release ] \ + && [ "$(. /etc/os-release && printf '%s' "$VERSION_ID")" = "24.10" ]; then +cat 1>&2 <&2 <= 10 or Ubuntu >= 20.04. This version of Ubuntu/Debian is too old and not supported. +EOF + exit 1 + fi + if [ "$os_ver" = "trixiesid" ] && [ -f /etc/os-release ] \ + && [ "$(. /etc/os-release && printf '%s' "$VERSION_ID")" = "24.10" ]; then +cat 1>&2 <&2 <= 10 or Ubuntu >= 20.04. This version of Ubuntu/Debian is too old and not supported. +EOF + exit 1 + fi + if [ "$os_ver" = "trixiesid" ] && [ -f /etc/os-release ] \ + && [ "$(. /etc/os-release && printf '%s' "$VERSION_ID")" = "24.10" ]; then +cat 1>&2 <&2 <= 10 or Ubuntu >= 20.04. This version of Ubuntu/Debian is too old and not supported. +EOF + exit 1 + fi + if [ "$os_ver" = "trixiesid" ] && [ -f /etc/os-release ] \ + && [ "$(. /etc/os-release && printf '%s' "$VERSION_ID")" = "24.10" ]; then +cat 1>&2 <&2 <= 10 or Ubuntu >= 20.04. This version of Ubuntu/Debian is too old and not supported. +EOF + exit 1 + fi + if [ "$os_ver" = "trixiesid" ] && [ -f /etc/os-release ] \ + && [ "$(. /etc/os-release && printf '%s' "$VERSION_ID")" = "24.10" ]; then +cat 1>&2 <