]> git.ipfire.org Git - ipfire-2.x.git/commit
update.sh: Adds code to update an existing ovpnconfig with pass or no-pass
authorAdolf Belka <adolf.belka@ipfire.org>
Mon, 25 Sep 2023 16:41:56 +0000 (18:41 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 28 Sep 2023 09:34:23 +0000 (09:34 +0000)
commitf8648b956351abb936bae94c9cce84b95b7ca23c
tree4ba90f44dd493b6681701a030ebca9323d72cd7b
parent8e6bf12f14c87854d311682d04e2269a6d96bbc3
update.sh: Adds code to update an existing ovpnconfig with pass or no-pass

- The code checks first if ovpnconfig exists and is not empty.
- Then it makes all net2net connections no-pass since they do not use encryption
- Then it cycles through all .p12 files and checks with openssl if a password exists or not.
   If a password is present then pass is added to index 41 and if not then no-pass is added
   to index 41
- I had to add a blank line to the top of the ovpnconfig file otherwise the awk code
   treated the first line as a blank line and missed it out of the update. This was the
   problem that was discovered during the previous Testing Release evaluation.
   Tested out this time with several existing entries both encrypted and insecure and with
   additional entries of both added in afterwards and all connection entries were
   maintained - road warrior and net2net.
- This code should be left in update.sh for future Core Updates in case people don't update
   with Core Update 175 but leave it till later. This code works fine on code that already
   has pass or no-pass entered into index 41 in ovpnconfig

Fixes: Bug#11048
Suggested-by: Erik Kapfer <ummeegge@ipfire.org>
Suggested-by: Adolf Belka <adolf.belka@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/181/update.sh