Rev 482: disable a node if testparm thinks there is a error, or warning, or an unrecognised option in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Wed Jun 6 09:46:25 GMT 2007


------------------------------------------------------------
revno: 482
revision-id: tridge at samba.org-20070606094625-rr6b22zkbeskchvj
parent: tridge at samba.org-20070606064959-prbxq97dwqthth82
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Wed 2007-06-06 19:46:25 +1000
message:
  disable a node if testparm thinks there is a error, or warning, or an unrecognised option
modified:
  config/events.d/50.samba       samba-20070601105340-vlcvnp6euoj3zdwy-3
=== modified file 'config/events.d/50.samba'
--- a/config/events.d/50.samba	2007-06-06 02:08:42 +0000
+++ b/config/events.d/50.samba	2007-06-06 09:46:25 +0000
@@ -52,6 +52,11 @@
 	;;
 
      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	
 



More information about the samba-cvs mailing list