mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
Merge commit 'martins/master'
(This used to be ctdb commit 5f14874c5c705dd637f88a77f30c930fea1201d2)
This commit is contained in:
commit
df0dba1862
@ -44,9 +44,9 @@ case $cmd in
|
||||
[ -f $CTDB_BASE/state/vsftpd/restart ] && {
|
||||
service vsftpd stop > /dev/null 2>&1
|
||||
service vsftpd start
|
||||
/bin/rm -f $CTDB_BASE/state/vsftpd/restart 2>/dev/null
|
||||
ctdb_counter_init "$VSFTPD_FAILS"
|
||||
} >/dev/null 2>&1
|
||||
|
||||
/bin/rm -f $CTDB_BASE/state/vsftpd/restart 2>/dev/null
|
||||
;;
|
||||
|
||||
monitor)
|
||||
|
@ -167,17 +167,20 @@ ctdb_check_rpc() {
|
||||
|
||||
######################################################
|
||||
# check a set of directories is available
|
||||
# return 0 on a missing directory
|
||||
# return 1 on a missing directory
|
||||
# usage: ctdb_check_directories_probe SERVICE_NAME <directories...>
|
||||
######################################################
|
||||
ctdb_check_directories_probe() {
|
||||
service_name="$1"
|
||||
shift
|
||||
wait_dirs="$*"
|
||||
[ -z "$wait_dirs" ] && return;
|
||||
for d in $wait_dirs; do
|
||||
( echo $d | grep -q '%' ) && continue
|
||||
[ -d $d ] || return 1
|
||||
for d ; do
|
||||
case "$d" in
|
||||
*%*)
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
[ -d "$d" ] || return 1
|
||||
esac
|
||||
done
|
||||
return 0
|
||||
}
|
||||
@ -187,10 +190,8 @@ ctdb_check_directories_probe() {
|
||||
# usage: ctdb_check_directories SERVICE_NAME <directories...>
|
||||
######################################################
|
||||
ctdb_check_directories() {
|
||||
service_name="$1"
|
||||
shift
|
||||
wait_dirs="$*"
|
||||
ctdb_check_directories_probe "$service_name" $wait_dirs || {
|
||||
# Note: ctdb_check_directories_probe sets both $service_name and $d.
|
||||
ctdb_check_directories_probe "$@" || {
|
||||
echo "ERROR: $service_name directory $d not available"
|
||||
exit 1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user