diff options
author | James Geboski <jgeboski@gmail.com> | 2012-04-29 20:03:28 -0400 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2012-04-30 00:40:02 -0500 |
commit | 19484706bc5e9f99fb96d7c9676cb319b6e427ee (patch) | |
tree | b6412a8b1bbad6af015634557ec7c1a893cf4030 /network/murmur/doinst.sh | |
parent | acc3b328571dd827f897558f595c78cfd11c6bbd (diff) | |
download | slackbuilds-19484706bc5e9f99fb96d7c9676cb319b6e427ee.tar.gz |
network/murmur: Updated for version 1.2.3 new maintainer.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/murmur/doinst.sh')
-rw-r--r-- | network/murmur/doinst.sh | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/network/murmur/doinst.sh b/network/murmur/doinst.sh index 4632adfb54..116fd0b4fa 100644 --- a/network/murmur/doinst.sh +++ b/network/murmur/doinst.sh @@ -3,24 +3,26 @@ 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 + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then rm $NEW fi - # Otherwise, we leave the .new copy for the admin to consider... } -# Keep same perms on rc.murmur.new: -if [ -e etc/rc.d/rc.murmur ]; then - cp -a etc/rc.d/rc.murmur etc/rc.d/rc.murmur.new.incoming - cat etc/rc.d/rc.murmur.new > etc/rc.d/rc.murmur.new.incoming - mv etc/rc.d/rc.murmur.new.incoming etc/rc.d/rc.murmur.new -else - # Install executable otherwise - irrelevant unless user starts in rc.local - chmod 0755 etc/rc.d/rc.murmur.new -fi +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} -config etc/rc.d/rc.murmur.new +config etc/logrotate.d/murmur.new config etc/murmur.ini.new + +preserve_perms etc/rc.d/rc.murmur.new |