diff options
author | Thomas Szteliga <ts@websafe.pl> | 2016-09-17 07:58:52 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-09-17 07:58:52 +0700 |
commit | 8045aefdaac2ae8c92b5201e07763a7e17077dde (patch) | |
tree | 07e75cff51485bb94c3ae999b0a5ef44374cc43d /network/glusterfs/doinst.sh | |
parent | 4a3d751ad2beb89a9975640898d46f1715d79902 (diff) |
network/glusterfs: Added (scalable network filesystem).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/glusterfs/doinst.sh')
-rw-r--r-- | network/glusterfs/doinst.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/network/glusterfs/doinst.sh b/network/glusterfs/doinst.sh new file mode 100644 index 000000000000..71a4cb940778 --- /dev/null +++ b/network/glusterfs/doinst.sh @@ -0,0 +1,31 @@ +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... +} + +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/ganesha/ganesha-ha.conf.sample.new +config etc/glusterfs/glusterd.vol.new +config etc/glusterfs/group-virt.example.new +config etc/glusterfs/logger.conf.example.new +config etc/logrotate.d/glusterfs-georep.new +config etc/logrotate.d/glusterfs.new +preserve_perms etc/rc.d/rc.glusterd.new |