diff options
author | B. Watson <yalhcru@gmail.com> | 2018-08-03 05:57:19 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-08-04 08:17:11 +0700 |
commit | c307650f720584677c21b0d311ff566df8b83dfc (patch) | |
tree | 378182019151f2409c0ac346b3cd520e1cb322f5 /network/ipxnet/doinst.sh | |
parent | f516576ada936b719baa671f569f1a4b2ffabea9 (diff) |
network/ipxnet: Added (tunnel IPX over TCP/IP).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/ipxnet/doinst.sh')
-rw-r--r-- | network/ipxnet/doinst.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/network/ipxnet/doinst.sh b/network/ipxnet/doinst.sh new file mode 100644 index 0000000000000..5af0d51745ef4 --- /dev/null +++ b/network/ipxnet/doinst.sh @@ -0,0 +1,32 @@ + +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 +} + +preserve_perms etc/rc.d/rc.ipxnet.new +config etc/rc.d/rc.ipxnet.conf.new + +# create log if missing, make sure ownership is correct. log +# will not be removed on package removal. +touch var/log/ipxnet.log +chown @IPXUSER@:@IPXGROUP@ var/log/ipxnet.log + +# 14.2 uses tar-1.15 for makepkg, can't handle capabilities, so: +[ -e /sbin/setcap] && /sbin/setcap cap_net_bind_service=epi usr/sbin/ipxnet-system |