diff options
author | Andreas Liebe <andreas.liebe@outlook.com> | 2019-06-29 06:37:47 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-06-29 06:37:47 +0700 |
commit | 8aea1abc06f895907faf50121bc92bb275815fca (patch) | |
tree | fb021a5d7b6e9e7c16aba343b12c42a360bd26dd /network/igmpproxy/doinst.sh | |
parent | b8855682ce0336a53bab05491830ec5b09303a39 (diff) |
network/igmpproxy: Added (IGMP multicast routing daemon).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/igmpproxy/doinst.sh')
-rw-r--r-- | network/igmpproxy/doinst.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/network/igmpproxy/doinst.sh b/network/igmpproxy/doinst.sh new file mode 100644 index 0000000000000..0108be007c01e --- /dev/null +++ b/network/igmpproxy/doinst.sh @@ -0,0 +1,22 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $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/igmpproxy.conf.new +preserve_perms etc/rc.d/rc.igmpproxy.new |