From edf35a62ae5790efd15ad263724755ff10f462e5 Mon Sep 17 00:00:00 2001 From: Jonathan Larsen Date: Wed, 12 May 2010 23:32:49 +0200 Subject: network/strongswan: Added to 12.2 repository --- network/strongswan/doinst.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 network/strongswan/doinst.sh (limited to 'network/strongswan/doinst.sh') diff --git a/network/strongswan/doinst.sh b/network/strongswan/doinst.sh new file mode 100644 index 0000000000..760618d9b9 --- /dev/null +++ b/network/strongswan/doinst.sh @@ -0,0 +1,15 @@ +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... +} + +config etc/ipsec.conf.new +config etc/strongswan.conf.new + -- cgit v1.2.3-65-gdbad