]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
disable a node if testparm thinks there is a error, or warning, or an unrecognised...
authorAndrew Tridgell <tridge@samba.org>
Wed, 6 Jun 2007 09:46:25 +0000 (19:46 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 6 Jun 2007 09:46:25 +0000 (19:46 +1000)
(This used to be ctdb commit ded80c83002a267996b4616e3702988b821cd422)

ctdb/config/events.d/50.samba

index 75342f5f0db36aeb730ea121d7787102d63d0c30..5373a78f6acac6fbb12f5018552e3c9bbde3bb2c 100755 (executable)
@@ -52,6 +52,11 @@ case $cmd in
        ;;
 
      monitor)
+       testparm -st 2>&1 | egrep '^WARNING|^ERROR|^Unknown' && {
+           echo "`date` ERROR: testparm shows smb.conf is not clean"
+           exit 1
+       }
+
        smb_dirs=`testparm -st 2> /dev/null | egrep '^\s*path = '  | cut -d= -f2`
        ctdb_check_directories "Samba" $smb_dirs