summaryrefslogtreecommitdiffstats
path: root/ctdb/config
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2010-11-16 19:42:31 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2010-11-17 11:44:26 +1100
commite23ca7dba563ff2d3c024f2e9a68b956a0ab0ee2 (patch)
tree26cf670762d7a8307ca786017a1c5b57f44f08f1 /ctdb/config
parent6ab5ae2c9b43243555578ef805654519c341afd2 (diff)
downloadsamba-e23ca7dba563ff2d3c024f2e9a68b956a0ab0ee2.tar.gz
samba-e23ca7dba563ff2d3c024f2e9a68b956a0ab0ee2.tar.xz
samba-e23ca7dba563ff2d3c024f2e9a68b956a0ab0ee2.zip
Make a time comparison in 60.nfs eventscript more readable.
Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 26077e6c8eb126584af587e7416154ea4858aea2)
Diffstat (limited to 'ctdb/config')
-rwxr-xr-xctdb/config/events.d/60.nfs3
1 files changed, 1 insertions, 2 deletions
diff --git a/ctdb/config/events.d/60.nfs b/ctdb/config/events.d/60.nfs
index f424f8cb29..038adbb094 100755
--- a/ctdb/config/events.d/60.nfs
+++ b/ctdb/config/events.d/60.nfs
@@ -130,8 +130,7 @@ case "$1" in
# clients need notifications
LAST_UPDATE=`stat --printf="%Y" $CTDB_VARDIR/state/statd/update-trigger`
CURRENT_TIME=`date +"%s"`
- expr "$CURRENT_TIME" ">" "(" "$LAST_UPDATE" "+" "60" ")" >/dev/null 2>/dev/null
- [ $? = "0" ] && {
+ [ $CURRENT_TIME -ge $(($LAST_UPDATE + 60)) ] && {
mkdir -p $CTDB_VARDIR/state/statd
touch $CTDB_VARDIR/state/statd/update-trigger
$CTDB_BASE/statd-callout updatelocal &