Eventscripts - in 60.nfs uniquify the share check directory list
authorMartin Schwenke <martin@meltin.net>
Wed, 17 Aug 2011 07:42:07 +0000 (17:42 +1000)
committerMartin Schwenke <martin@meltin.net>
Mon, 29 Aug 2011 23:33:47 +0000 (09:33 +1000)
There are sites that have multiple entries for the same export.  This
optimises the share check in this case.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/60.nfs

index 87a91df5b5bb96eefd0637dc0339a39be4d333aa..e8ac61fe4319356f02f4807103e787fec36a43e0 100755 (executable)
@@ -70,6 +70,7 @@ case "$1" in
        [ "$CTDB_NFS_SKIP_SHARE_CHECK" = "yes" ] || {
            exportfs -v | grep '^/' | 
            sed -r -e 's@[[:space:]]+[^[:space:]()]+\([^[:space:]()]+\)$@@' | 
+           sort -u | 
            ctdb_check_directories 
        } || exit $?