mirror of
https://github.com/deajan/obackup.git
synced 2025-01-12 23:23:53 +01:00
Fixed Android / CentOS 5 compat
This commit is contained in:
parent
b1ea1dfa2c
commit
b21fafd523
@ -634,7 +634,7 @@ function GetDiskSpaceLocal {
|
|||||||
if [ -d "$path_to_check" ]; then
|
if [ -d "$path_to_check" ]; then
|
||||||
# Not elegant solution to make df silent on errors
|
# Not elegant solution to make df silent on errors
|
||||||
# No sudo on local commands, assuming you should have all the necesarry rights to check backup directories sizes
|
# No sudo on local commands, assuming you should have all the necesarry rights to check backup directories sizes
|
||||||
df "$path_to_check" > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID" 2>&1
|
$DF_CMD "$path_to_check" > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID" 2>&1
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
DISK_SPACE=0
|
DISK_SPACE=0
|
||||||
Logger "Cannot get disk space in [$path_to_check] on local system." "ERROR"
|
Logger "Cannot get disk space in [$path_to_check] on local system." "ERROR"
|
||||||
@ -659,7 +659,7 @@ function GetDiskSpaceRemote {
|
|||||||
|
|
||||||
local cmd
|
local cmd
|
||||||
|
|
||||||
cmd=$SSH_CMD' "if [ -d \"'$path_to_check'\" ]; then '$COMMAND_SUDO' df \"'$path_to_check'\"; else exit 1; fi" > "'$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID'" 2>&1'
|
cmd=$SSH_CMD' "if [ -d \"'$path_to_check'\" ]; then '$COMMAND_SUDO' '$DF_CMD' \"'$path_to_check'\"; else exit 1; fi" > "'$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID'" 2>&1'
|
||||||
Logger "cmd: $cmd" "DEBUG"
|
Logger "cmd: $cmd" "DEBUG"
|
||||||
eval "$cmd" &
|
eval "$cmd" &
|
||||||
WaitForTaskCompletion $! $SOFT_MAX_EXEC_TIME_DB_TASK $HARD_MAX_EXEC_TIME_DB_TASK ${FUNCNAME[0]} true $KEEP_LOGGING
|
WaitForTaskCompletion $! $SOFT_MAX_EXEC_TIME_DB_TASK $HARD_MAX_EXEC_TIME_DB_TASK ${FUNCNAME[0]} true $KEEP_LOGGING
|
||||||
|
Loading…
Reference in New Issue
Block a user