diff options
author | Dockland Porter <commer206@gmail.com> | 2016-08-23 23:20:09 +0100 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2016-08-28 00:22:59 +0100 |
commit | d364a3c53259760addcc33a4f8475964bed0529b (patch) | |
tree | d3ed74af4a2bc1fecc6a835fcf978667598300cb /system/crmsh/doinst.sh | |
parent | 4b720545f1ddbfee01a06832b09e7297ede74e4d (diff) | |
download | slackbuilds-d364a3c53259760addcc33a4f8475964bed0529b.tar.gz |
system/crmsh: Added (cluster management shell).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/crmsh/doinst.sh')
-rw-r--r-- | system/crmsh/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/crmsh/doinst.sh b/system/crmsh/doinst.sh new file mode 100644 index 0000000000..b90d0c589f --- /dev/null +++ b/system/crmsh/doinst.sh @@ -0,0 +1,14 @@ +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... +} + +config etc/crm/crm.conf.new |