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 ] && {
|
[ -f $CTDB_BASE/state/vsftpd/restart ] && {
|
||||||
service vsftpd stop > /dev/null 2>&1
|
service vsftpd stop > /dev/null 2>&1
|
||||||
service vsftpd start
|
service vsftpd start
|
||||||
|
/bin/rm -f $CTDB_BASE/state/vsftpd/restart 2>/dev/null
|
||||||
|
ctdb_counter_init "$VSFTPD_FAILS"
|
||||||
} >/dev/null 2>&1
|
} >/dev/null 2>&1
|
||||||
|
|
||||||
/bin/rm -f $CTDB_BASE/state/vsftpd/restart 2>/dev/null
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
monitor)
|
monitor)
|
||||||
|
@ -167,17 +167,20 @@ ctdb_check_rpc() {
|
|||||||
|
|
||||||
######################################################
|
######################################################
|
||||||
# check a set of directories is available
|
# 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...>
|
# usage: ctdb_check_directories_probe SERVICE_NAME <directories...>
|
||||||
######################################################
|
######################################################
|
||||||
ctdb_check_directories_probe() {
|
ctdb_check_directories_probe() {
|
||||||
service_name="$1"
|
service_name="$1"
|
||||||
shift
|
shift
|
||||||
wait_dirs="$*"
|
for d ; do
|
||||||
[ -z "$wait_dirs" ] && return;
|
case "$d" in
|
||||||
for d in $wait_dirs; do
|
*%*)
|
||||||
( echo $d | grep -q '%' ) && continue
|
continue
|
||||||
[ -d $d ] || return 1
|
;;
|
||||||
|
*)
|
||||||
|
[ -d "$d" ] || return 1
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -187,10 +190,8 @@ ctdb_check_directories_probe() {
|
|||||||
# usage: ctdb_check_directories SERVICE_NAME <directories...>
|
# usage: ctdb_check_directories SERVICE_NAME <directories...>
|
||||||
######################################################
|
######################################################
|
||||||
ctdb_check_directories() {
|
ctdb_check_directories() {
|
||||||
service_name="$1"
|
# Note: ctdb_check_directories_probe sets both $service_name and $d.
|
||||||
shift
|
ctdb_check_directories_probe "$@" || {
|
||||||
wait_dirs="$*"
|
|
||||||
ctdb_check_directories_probe "$service_name" $wait_dirs || {
|
|
||||||
echo "ERROR: $service_name directory $d not available"
|
echo "ERROR: $service_name directory $d not available"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user