diff options
author | Murat D. Kadirov <banderols@gmail.com> | 2010-05-11 22:54:48 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 22:54:48 +0200 |
commit | 03fcadb30b7851a3d74c669e1910ee88bfec7985 (patch) | |
tree | 9dc41e2d8d8a4d84e512971b5cf5fcc4ec05a064 /network/hostapd/doinst.sh | |
parent | 57ffdc3d18412f405daec78eeefca32a12fb2e63 (diff) |
network/hostapd: Added to 12.1 repository
Diffstat (limited to 'network/hostapd/doinst.sh')
-rw-r--r-- | network/hostapd/doinst.sh | 15 |
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... +} + |