aboutsummaryrefslogtreecommitdiff
path: root/network/hostapd/doinst.sh
diff options
context:
space:
mode:
authorMurat D. Kadirov <banderols@gmail.com>2010-05-11 22:54:48 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 22:54:48 +0200
commit03fcadb30b7851a3d74c669e1910ee88bfec7985 (patch)
tree9dc41e2d8d8a4d84e512971b5cf5fcc4ec05a064 /network/hostapd/doinst.sh
parent57ffdc3d18412f405daec78eeefca32a12fb2e63 (diff)
network/hostapd: Added to 12.1 repository
Diffstat (limited to 'network/hostapd/doinst.sh')
-rw-r--r--network/hostapd/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/network/hostapd/doinst.sh b/network/hostapd/doinst.sh
new file mode 100644
index 0000000000000..1c9c32c1c8dda
--- /dev/null
+++ b/network/hostapd/doinst.sh
@@ -0,0 +1,15 @@
+#!/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...
+}
+