From: Martin Schwenke Date: Tue, 16 Nov 2010 08:42:31 +0000 (+1100) Subject: Make a time comparison in 60.nfs eventscript more readable. X-Git-Url: http://git.samba.org/?p=metze%2Fctdb%2Fwip.git;a=commitdiff_plain;h=26077e6c8eb126584af587e7416154ea4858aea2 Make a time comparison in 60.nfs eventscript more readable. Signed-off-by: Martin Schwenke --- diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs index f424f8cb..038adbb0 100755 --- 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 &