Cleanup
- Improve display of Libreswan versions in upgrade scripts - Clean up notes
This commit is contained in:
parent
dfc5fce92c
commit
329a5ecf50
@ -58,6 +58,7 @@ if [ "$swan_ver_is_supported" != "1" ]; then
|
||||
fi
|
||||
|
||||
ipsec_ver="$(/usr/local/sbin/ipsec --version 2>/dev/null)"
|
||||
ipsec_ver_short="$(printf '%s' "$ipsec_ver" | sed -e 's/Linux Libreswan/Libreswan/' -e 's/ (netkey) on .*//')"
|
||||
if ! printf '%s' "$ipsec_ver" | grep -q "Libreswan"; then
|
||||
exiterr "This script requires Libreswan already installed."
|
||||
fi
|
||||
@ -105,8 +106,8 @@ Additional packages required for compilation will also be installed.
|
||||
|
||||
It is intended for upgrading servers to a newer Libreswan version.
|
||||
|
||||
Current version: $ipsec_ver
|
||||
Version to be installed: Libreswan $SWAN_VER
|
||||
Current version: $ipsec_ver_short
|
||||
Version to install: Libreswan $SWAN_VER
|
||||
|
||||
EOF
|
||||
|
||||
@ -211,14 +212,21 @@ sed -i".old-$(date +%F-%T)" \
|
||||
mkdir -p /run/pluto
|
||||
service ipsec restart
|
||||
|
||||
echo
|
||||
echo "Libreswan $SWAN_VER was installed successfully! "
|
||||
echo
|
||||
cat <<EOF
|
||||
|
||||
|
||||
===================================================
|
||||
|
||||
Libreswan $SWAN_VER has been successfully installed!
|
||||
|
||||
===================================================
|
||||
|
||||
EOF
|
||||
|
||||
if [ "$is_upgrade_to_323_or_newer" = "1" ]; then
|
||||
cat <<'EOF'
|
||||
IMPORTANT: Users upgrading to Libreswan 3.23 or newer must edit
|
||||
/etc/ipsec.conf and replace these two lines:
|
||||
IMPORTANT: Users upgrading to Libreswan 3.23 or newer must edit /etc/ipsec.conf
|
||||
and replace these two lines:
|
||||
|
||||
modecfgdns1=DNS_SERVER_1
|
||||
modecfgdns2=DNS_SERVER_2
|
||||
@ -234,8 +242,8 @@ fi
|
||||
|
||||
if [ "$is_downgrade_to_322_or_older" = "1" ]; then
|
||||
cat <<'EOF'
|
||||
IMPORTANT: Users downgrading to Libreswan 3.22 or older must edit
|
||||
/etc/ipsec.conf and replace this line:
|
||||
IMPORTANT: Users downgrading to Libreswan 3.22 or older must edit /etc/ipsec.conf
|
||||
and replace this line:
|
||||
|
||||
modecfgdns="DNS_SERVER_1, DNS_SERVER_2"
|
||||
|
||||
|
@ -49,6 +49,7 @@ if [ "$swan_ver_is_supported" != "1" ]; then
|
||||
fi
|
||||
|
||||
ipsec_ver="$(/usr/local/sbin/ipsec --version 2>/dev/null)"
|
||||
ipsec_ver_short="$(printf '%s' "$ipsec_ver" | sed -e 's/Linux Libreswan/Libreswan/' -e 's/ (netkey) on .*//')"
|
||||
if ! printf '%s' "$ipsec_ver" | grep -q "Libreswan"; then
|
||||
exiterr "This script requires Libreswan already installed."
|
||||
fi
|
||||
@ -96,8 +97,8 @@ Additional packages required for compilation will also be installed.
|
||||
|
||||
It is intended for upgrading servers to a newer Libreswan version.
|
||||
|
||||
Current version: $ipsec_ver
|
||||
Version to be installed: Libreswan $SWAN_VER
|
||||
Current version: $ipsec_ver_short
|
||||
Version to install: Libreswan $SWAN_VER
|
||||
|
||||
EOF
|
||||
|
||||
@ -212,14 +213,21 @@ sed -i".old-$(date +%F-%T)" \
|
||||
mkdir -p /run/pluto
|
||||
service ipsec restart
|
||||
|
||||
echo
|
||||
echo "Libreswan $SWAN_VER was installed successfully! "
|
||||
echo
|
||||
cat <<EOF
|
||||
|
||||
|
||||
===================================================
|
||||
|
||||
Libreswan $SWAN_VER has been successfully installed!
|
||||
|
||||
===================================================
|
||||
|
||||
EOF
|
||||
|
||||
if [ "$is_upgrade_to_323_or_newer" = "1" ]; then
|
||||
cat <<'EOF'
|
||||
IMPORTANT: Users upgrading to Libreswan 3.23 or newer must edit
|
||||
/etc/ipsec.conf and replace these two lines:
|
||||
IMPORTANT: Users upgrading to Libreswan 3.23 or newer must edit /etc/ipsec.conf
|
||||
and replace these two lines:
|
||||
|
||||
modecfgdns1=DNS_SERVER_1
|
||||
modecfgdns2=DNS_SERVER_2
|
||||
@ -235,8 +243,8 @@ fi
|
||||
|
||||
if [ "$is_downgrade_to_322_or_older" = "1" ]; then
|
||||
cat <<'EOF'
|
||||
IMPORTANT: Users downgrading to Libreswan 3.22 or older must edit
|
||||
/etc/ipsec.conf and replace this line:
|
||||
IMPORTANT: Users downgrading to Libreswan 3.22 or older must edit /etc/ipsec.conf
|
||||
and replace this line:
|
||||
|
||||
modecfgdns="DNS_SERVER_1, DNS_SERVER_2"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user