diff options
author | Wayne Cuddy <wcuddy@gmail.com> | 2019-03-03 08:55:40 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-03-16 06:53:11 +0700 |
commit | 859a0dd6da2062fb6feaa4ec401584ad515ee931 (patch) | |
tree | 6dba868cde880572ac70515bbcb008317e9dbbaa /network/strongswan/doinst.sh | |
parent | c8e8451bbbfc25330c1663e75e4e961db534e9fe (diff) | |
download | slackbuilds-859a0dd6da2062fb6feaa4ec401584ad515ee931.tar.gz |
network/strongswan: Updated for version 5.7.2.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/strongswan/doinst.sh')
-rw-r--r-- | network/strongswan/doinst.sh | 75 |
1 files changed, 19 insertions, 56 deletions
diff --git a/network/strongswan/doinst.sh b/network/strongswan/doinst.sh index 4b38254410..a88995c5ed 100644 --- a/network/strongswan/doinst.sh +++ b/network/strongswan/doinst.sh @@ -1,59 +1,22 @@ + config() { - NEW="$1" - OLD="$(dirname $NEW)/$(basename $NEW .new)" - # If there's no config file by that name, mv it over: - if [ ! -r $OLD ]; then - mv $NEW $OLD - elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy - rm $NEW - fi - # Otherwise, we leave the .new copy for the admin to consider... + NEW="$1" + OLD="${1%.new}" + if [ ! -r $OLD ]; + then + # If there's no config file by that name, mv it over: + mv $NEW $OLD + elif [ "$(md5sum <$OLD)" = "$(md5sum <$NEW)" ]; + then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... } -config etc/ipsec.conf.new -config etc/ipsec.secrets.new -config etc/strongswan.conf.new -config etc/swanctl/swanctl.conf.new -config etc/strongswan.d/starter.conf.new -config etc/strongswan.d/swanctl.conf.new -config etc/strongswan.d/charon-logging.conf.new -config etc/strongswan.d/pki.conf.new -config etc/strongswan.d/scepclient.conf.new -config etc/strongswan.d/charon/attr.conf.new -config etc/strongswan.d/charon/sshkey.conf.new -config etc/strongswan.d/charon/pem.conf.new -config etc/strongswan.d/charon/mgf1.conf.new -config etc/strongswan.d/charon/pkcs8.conf.new -config etc/strongswan.d/charon/kernel-netlink.conf.new -config etc/strongswan.d/charon/nonce.conf.new -config etc/strongswan.d/charon/curve25519.conf.new -config etc/strongswan.d/charon/pkcs12.conf.new -config etc/strongswan.d/charon/x509.conf.new -config etc/strongswan.d/charon/dnskey.conf.new -config etc/strongswan.d/charon/stroke.conf.new -config etc/strongswan.d/charon/random.conf.new -config etc/strongswan.d/charon/hmac.conf.new -config etc/strongswan.d/charon/vici.conf.new -config etc/strongswan.d/charon/md5.conf.new -config etc/strongswan.d/charon/pubkey.conf.new -config etc/strongswan.d/charon/counters.conf.new -config etc/strongswan.d/charon/sha2.conf.new -config etc/strongswan.d/charon/rc2.conf.new -config etc/strongswan.d/charon/pkcs1.conf.new -config etc/strongswan.d/charon/aes.conf.new -config etc/strongswan.d/charon/xauth-generic.conf.new -config etc/strongswan.d/charon/revocation.conf.new -config etc/strongswan.d/charon/cmac.conf.new -config etc/strongswan.d/charon/sha1.conf.new -config etc/strongswan.d/charon/updown.conf.new -config etc/strongswan.d/charon/pkcs7.conf.new -config etc/strongswan.d/charon/fips-prf.conf.new -config etc/strongswan.d/charon/gmp.conf.new -config etc/strongswan.d/charon/pgp.conf.new -config etc/strongswan.d/charon/xcbc.conf.new -config etc/strongswan.d/charon/openssl.conf.new -config etc/strongswan.d/charon/des.conf.new -config etc/strongswan.d/charon/constraints.conf.new -config etc/strongswan.d/charon/resolve.conf.new -config etc/strongswan.d/charon/socket-default.conf.new -config etc/strongswan.d/charon.conf.new +# doinst.sh reads the list of files from ./install/conffiles at install time. +# ./install/conffiles was generated by strongswan.SlackBuild +for cf in $(cat install/conffiles) +do + config $cf.new +done |