1
0
mirror of synced 2025-02-16 20:13:19 +03:00

Improve upgrade scripts

- Cleanup
This commit is contained in:
hwdsl2 2022-01-29 01:47:45 -06:00
parent c2d7eef27c
commit e16151f183
4 changed files with 35 additions and 79 deletions

View File

@ -78,25 +78,6 @@ Error: This script requires Libreswan already installed.
EOF
exit 1
fi
if [ "$swan_ver_old" = "$SWAN_VER" ]; then
cat <<EOF
You already have Libreswan version $SWAN_VER installed!
If you continue, the same version will be re-installed.
EOF
printf "Do you want to continue anyway? [y/N] "
read -r response
case $response in
[yY][eE][sS]|[yY])
echo
;;
*)
echo "Abort. No changes were made."
exit 1
;;
esac
fi
}
show_setup_info() {
@ -121,6 +102,14 @@ WARNING: Older versions of Libreswan could contain known security vulnerabilitie
See https://libreswan.org/security/ for more information.
Are you sure you want to install an older version?
EOF
fi
if [ "$swan_ver_old" = "$SWAN_VER" ]; then
cat <<EOF
Note: You already have Libreswan version $SWAN_VER installed!
If you continue, the same version will be re-installed.
EOF
fi

View File

@ -46,7 +46,7 @@ check_libreswan() {
cat 1>&2 <<EOF
Error: Libreswan version '$SWAN_VER' is not supported.
This script can install one of these versions:
3.32, 4.1-4.5 or 4.6
3.32, 4.1-4.6
EOF
exit 1
;;
@ -61,25 +61,6 @@ Error: This script requires Libreswan already installed.
EOF
exit 1
fi
if [ "$swan_ver_old" = "$SWAN_VER" ]; then
cat <<EOF
You already have Libreswan version $SWAN_VER installed!
If you continue, the same version will be re-installed.
EOF
printf "Do you want to continue anyway? [y/N] "
read -r response
case $response in
[yY][eE][sS]|[yY])
echo
;;
*)
echo "Abort. No changes were made."
exit 1
;;
esac
fi
}
show_setup_info() {
@ -104,6 +85,14 @@ WARNING: Older versions of Libreswan could contain known security vulnerabilitie
See https://libreswan.org/security/ for more information.
Are you sure you want to install an older version?
EOF
fi
if [ "$swan_ver_old" = "$SWAN_VER" ]; then
cat <<EOF
Note: You already have Libreswan version $SWAN_VER installed!
If you continue, the same version will be re-installed.
EOF
fi

View File

@ -64,7 +64,7 @@ check_libreswan() {
cat 1>&2 <<EOF
Error: Libreswan version '$SWAN_VER' is not supported.
This script can install one of these versions:
3.32, 4.1-4.5 or 4.6
3.32, 4.1-4.6
EOF
exit 1
;;
@ -79,25 +79,6 @@ Error: This script requires Libreswan already installed.
EOF
exit 1
fi
if [ "$swan_ver_old" = "$SWAN_VER" ]; then
cat <<EOF
You already have Libreswan version $SWAN_VER installed!
If you continue, the same version will be re-installed.
EOF
printf "Do you want to continue anyway? [y/N] "
read -r response
case $response in
[yY][eE][sS]|[yY])
echo
;;
*)
echo "Abort. No changes were made."
exit 1
;;
esac
fi
}
show_setup_info() {
@ -122,6 +103,14 @@ WARNING: Older versions of Libreswan could contain known security vulnerabilitie
See https://libreswan.org/security/ for more information.
Are you sure you want to install an older version?
EOF
fi
if [ "$swan_ver_old" = "$SWAN_VER" ]; then
cat <<EOF
Note: You already have Libreswan version $SWAN_VER installed!
If you continue, the same version will be re-installed.
EOF
fi

View File

@ -69,7 +69,7 @@ check_libreswan() {
cat 1>&2 <<EOF
Error: Libreswan version '$SWAN_VER' is not supported.
This script can install one of these versions:
3.32, 4.1-4.5 or 4.6
3.32, 4.1-4.6
EOF
exit 1
;;
@ -88,25 +88,6 @@ Error: This script requires Libreswan already installed.
EOF
exit 1
fi
if [ "$swan_ver_old" = "$SWAN_VER" ]; then
cat <<EOF
You already have Libreswan version $SWAN_VER installed!
If you continue, the same version will be re-installed.
EOF
printf "Do you want to continue anyway? [y/N] "
read -r response
case $response in
[yY][eE][sS]|[yY])
echo
;;
*)
echo "Abort. No changes were made."
exit 1
;;
esac
fi
}
show_setup_info() {
@ -131,6 +112,14 @@ WARNING: Older versions of Libreswan could contain known security vulnerabilitie
See https://libreswan.org/security/ for more information.
Are you sure you want to install an older version?
EOF
fi
if [ "$swan_ver_old" = "$SWAN_VER" ]; then
cat <<EOF
Note: You already have Libreswan version $SWAN_VER installed!
If you continue, the same version will be re-installed.
EOF
fi