diff options
author | Jonathan Larsen <agentc0re@learnix.net> | 2010-05-12 23:32:49 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 23:32:49 +0200 |
commit | edf35a62ae5790efd15ad263724755ff10f462e5 (patch) | |
tree | 47730cbffe52e0a3d0bce88675603ede2a121d5a /network/strongswan/doinst.sh | |
parent | ac23f7579cef7d587954ae36544a421fcac769ba (diff) | |
download | slackbuilds-edf35a62ae5790efd15ad263724755ff10f462e5.tar.gz |
network/strongswan: Added to 12.2 repository
Diffstat (limited to 'network/strongswan/doinst.sh')
-rw-r--r-- | network/strongswan/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
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 + |