diff options
author | Marco Bonetti <sid77@slackware.it> | 2010-05-12 23:32:53 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 23:32:53 +0200 |
commit | 9d3128ccaf04b40859fac62c05a00e900d22535b (patch) | |
tree | abe99c904245be0efdf9fd8a56bf9137dee0f5c9 /network/warvox/doinst.sh | |
parent | 0d3981844e5bef98c119c1319c8a8967adefb996 (diff) | |
download | slackbuilds-9d3128ccaf04b40859fac62c05a00e900d22535b.tar.gz |
network/warvox: Added to 12.2 repository
Diffstat (limited to 'network/warvox/doinst.sh')
-rw-r--r-- | network/warvox/doinst.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/network/warvox/doinst.sh b/network/warvox/doinst.sh new file mode 100644 index 0000000000..0c19746d05 --- /dev/null +++ b/network/warvox/doinst.sh @@ -0,0 +1,22 @@ +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.warvox.new: +if [ -e etc/rc.d/rc.warvox ]; then + cp -a etc/rc.d/rc.warvox etc/rc.d/rc.warvox.new.incoming + cat etc/rc.d/rc.warvox.new > etc/rc.d/rc.warvox.new.incoming + mv etc/rc.d/rc.warvox.new.incoming etc/rc.d/rc.warvox.new +fi + +config etc/rc.d/rc.warvox.new +config etc/warvox.conf.new + |