1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

make it possible to disable checking all samba shares.

this is a timeconsuming process and might not be feasible to perform if there are very many thousand shares

(This used to be ctdb commit 051ae5f3c13892b860818eac803d348f09845dc6)
This commit is contained in:
root 2009-02-20 10:58:34 +11:00
parent d51a6313af
commit c72c15c19a
2 changed files with 20 additions and 13 deletions

View File

@ -42,6 +42,11 @@
# default is to not manage Samba
# CTDB_MANAGES_SAMBA=yes
# If there are very many shares it may not be feasible to check that all
# of them are available during each monitoring interval.
# In that case this check can be disabled
# CTDB_SAMBA_SKIP_SHARE_CHECK=yes
# specify which ports we should check that there is a daemon listening to
# by default we use testparm and look in smb.conf to figure out.
# CTDB_SAMBA_CHECK_PORTS="445"

View File

@ -214,21 +214,23 @@ case $cmd in
touch $CTDB_BASE/state/samba/periodic_cleanup
}
testparm_background_update
[ "$CTDB_SAMBA_SKIP_SHARE_CHECK" = "yes" ] || {
testparm_background_update
testparm_cat | egrep '^WARNING|^ERROR|^Unknown' && {
testparm_foreground_update
testparm_cat | egrep '^WARNING|^ERROR|^Unknown' && {
echo "ERROR: testparm shows smb.conf is not clean"
exit 1
}
}
testparm_cat | egrep '^WARNING|^ERROR|^Unknown' && {
testparm_foreground_update
testparm_cat | egrep '^WARNING|^ERROR|^Unknown' && {
echo "ERROR: testparm shows smb.conf is not clean"
exit 1
}
}
smb_dirs=`testparm_cat | egrep '^[[:space:]]*path = ' | cut -d= -f2`
ctdb_check_directories_probe "Samba" $smb_dirs || {
testparm_foreground_update
smb_dirs=`testparm_cat | egrep '^[[:space:]]*path = ' | cut -d= -f2`
ctdb_check_directories "Samba" $smb_dirs
smb_dirs=`testparm_cat | egrep '^[[:space:]]*path = ' | cut -d= -f2`
ctdb_check_directories_probe "Samba" $smb_dirs || {
testparm_foreground_update
smb_dirs=`testparm_cat | egrep '^[[:space:]]*path = ' | cut -d= -f2`
ctdb_check_directories "Samba" $smb_dirs
}
}
smb_ports="$CTDB_SAMBA_CHECK_PORTS"