summaryrefslogtreecommitdiffstats
path: root/network/xl2tpd/doinst.sh
diff options
context:
space:
mode:
author gshep2010-04-17 04:05:37 +0200
committer David Somero2010-05-15 10:38:11 +0200
commit89561721635655f34b446a885bdd0f2ede45bc95 (patch)
treece224939a76e9badab8dfab42fac75c1f275e7a5 /network/xl2tpd/doinst.sh
parentd09ff52f2a799879c552bbdc401dea4b5f99bda3 (diff)
downloadslackbuilds-89561721635655f34b446a885bdd0f2ede45bc95.tar.gz
network/xl2tpd: Added (L2TP daemon)
Diffstat (limited to 'network/xl2tpd/doinst.sh')
-rw-r--r--network/xl2tpd/doinst.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/network/xl2tpd/doinst.sh b/network/xl2tpd/doinst.sh
new file mode 100644
index 0000000000..c20744d1a0
--- /dev/null
+++ b/network/xl2tpd/doinst.sh
@@ -0,0 +1,17 @@
+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/xl2tpd/xl2tpd.conf.new
+config etc/ppp/options.xl2tpd.new
+config etc/ppp/chap-secrets.new
+