aboutsummaryrefslogtreecommitdiff
path: root/network/vde2/doinst.sh
diff options
context:
space:
mode:
authorAntonio Hernández Blas <hba.nihilismus@gmail.com>2010-05-05 22:14:05 +0200
committerHeinz Wiesinger <pprkut@slackbuilds.org>2010-05-16 22:27:27 -0500
commitc6e999a1dea4419293c416325d5ab1f71207528d (patch)
treef1e4140b8af3128fe8c67953c7f595cfc9430ad8 /network/vde2/doinst.sh
parent0a1ff17a80cdd02129a3a611ee41f86d7dbdff16 (diff)
network/vde2: Added. VDE is an ethernet compliant virtual network.
Diffstat (limited to 'network/vde2/doinst.sh')
-rw-r--r--network/vde2/doinst.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/network/vde2/doinst.sh b/network/vde2/doinst.sh
new file mode 100644
index 0000000000000..9c1d24ce7f23f
--- /dev/null
+++ b/network/vde2/doinst.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+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...
+}
+
+# Keep same perms on rc.vde2.new:
+if [ -e etc/rc.d/rc.vde2 ]; then
+ cp -a etc/rc.d/rc.vde2 etc/rc.d/rc.vde2.new.incoming
+ cat etc/rc.d/rc.vde2.new > etc/rc.d/rc.vde2.new.incoming
+ mv etc/rc.d/rc.vde2.new.incoming etc/rc.d/rc.vde2.new
+fi
+
+config etc/rc.d/rc.vde2.new
+