git.samba.org
/
sahlberg
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b717cf7
)
Make a time comparison in 60.nfs eventscript more readable.
author
Martin Schwenke
<martin@meltin.net>
Tue, 16 Nov 2010 08:42:31 +0000
(19:42 +1100)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Wed, 17 Nov 2010 00:44:31 +0000
(11:44 +1100)
Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/60.nfs
patch
|
blob
|
history
diff --git
a/config/events.d/60.nfs
b/config/events.d/60.nfs
index f424f8cb2951759270a3bd59c98af2166e5d8ae5..038adbb09409b34010f80219b1a211ec5b92e37e 100755
(executable)
--- a/
config/events.d/60.nfs
+++ b/
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 &