mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
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)
This commit is contained in:
parent
6ab5ae2c9b
commit
e23ca7dba5
@ -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 &
|
||||
|
Loading…
Reference in New Issue
Block a user