mirror of
https://github.com/samba-team/samba.git
synced 2025-03-22 02:50:28 +03:00
initscript: Look for tdbtool/tdbdump using which, not in fixed locations
Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c74cc0442eb90d859eae270b59456d28605817c4)
This commit is contained in:
parent
3769368a99
commit
27a5b78c8e
@ -130,17 +130,17 @@ select_tdb_checker ()
|
||||
{
|
||||
# Find the best TDB consistency check available.
|
||||
use_tdb_tool_check=false
|
||||
if [ -x /usr/bin/tdbtool ] && \
|
||||
echo "help" | /usr/bin/tdbtool | grep -q check ; then
|
||||
if which tdbtool >/dev/null 2>&1 && \
|
||||
echo "help" | tdbtool | grep -q check ; then
|
||||
|
||||
use_tdb_tool_check=true
|
||||
elif [ -x /usr/bin/tdbtool -a -x /usr/bin/tdbdump ] ; then
|
||||
elif which tdbtool >/dev/null 2>&1 && which tdbdump >/dev/null 2>&1 ; then
|
||||
do_log <<EOF
|
||||
WARNING: The installed 'tdbtool' does not offer the 'check' subcommand.
|
||||
Using 'tdbdump' for database checks.
|
||||
Consider updating 'tdbtool' for better checks!
|
||||
EOF
|
||||
elif [ -x /usr/bin/tdbdump ] ; then
|
||||
elif which tdbdump >/dev/null 2>&1 ; then
|
||||
do_log <<EOF
|
||||
WARNING: 'tdbtool' is not available.
|
||||
Using 'tdbdump' to check the databases.
|
||||
|
Loading…
x
Reference in New Issue
Block a user