Fixing issues between android and centos 5
This commit is contained in:
parent
00ac1645e1
commit
8ba36de138
|
@ -4,7 +4,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
||||||
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
||||||
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=1.2-beta3
|
PROGRAM_VERSION=1.2-beta3
|
||||||
PROGRAM_BUILD=2016111801
|
PROGRAM_BUILD=2016111901
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
# Execution order #__WITH_PARANOIA_DEBUG
|
# Execution order #__WITH_PARANOIA_DEBUG
|
||||||
|
@ -284,12 +284,7 @@ function _CheckDiskSpaceLocal {
|
||||||
|
|
||||||
Logger "Checking minimum disk space in [$replica_path]." "NOTICE"
|
Logger "Checking minimum disk space in [$replica_path]." "NOTICE"
|
||||||
|
|
||||||
# Check for -P portability switch
|
diskSpace=$($DF_CMD "$replica_path" | tail -1 | awk '{print $4}')
|
||||||
if df -P > /dev/null 2>&1; then
|
|
||||||
diskSpace=$(df -P "$replica_path" | tail -1 | awk '{print $4}')
|
|
||||||
else
|
|
||||||
diskSpace=$(df "$replica_path" | tail -1 | awk '{print $4}')
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
Logger "Cannot get free space." "ERROR"
|
Logger "Cannot get free space." "ERROR"
|
||||||
|
@ -317,7 +312,7 @@ function _CheckDiskSpaceRemote {
|
||||||
CheckConnectivity3rdPartyHosts
|
CheckConnectivity3rdPartyHosts
|
||||||
CheckConnectivityRemoteHost
|
CheckConnectivityRemoteHost
|
||||||
|
|
||||||
cmd=$SSH_CMD' "'$COMMAND_SUDO' if df -P > /dev/null 2>&1; then df -P \"'$replica_path'\"; else df \"'$replica_path'\"; fi" > "'$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID'" 2>&1'
|
cmd=$SSH_CMD' "'$COMMAND_SUDO' '$DF_CMD' \"'$replica_path'\"" > "'$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID'" 2>&1'
|
||||||
Logger "cmd: $cmd" "DEBUG"
|
Logger "cmd: $cmd" "DEBUG"
|
||||||
eval "$cmd"
|
eval "$cmd"
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
|
|
Loading…
Reference in New Issue