_Logger "\e[41mLogger function called without proper loglevel [$level].\e[0m""\e[41mLogger function called without proper loglevel [$level].\e[0m" true
Logger "${FUNCNAME[0]} called by [$id] finished monitoring pid [$pid] with exitcode [$retval].""ERROR"
Logger "${FUNCNAME[0]} called by [$id] finished monitoring pid [$pid] with exitcode [$retval].""DEBUG" #TODO: set this to debug in order to stop complaints
if["$functionMode"=="ParallelExec"];then
Logger "Command was [${commandsArrayPid[$pid]}].""ERROR"
echo"--force-unlock Will override any existing active or dead locks on initiator and target replica"
echo"--on-changes Will launch a sync task after a short wait period if there is some file activity on initiator replica. You should try daemon mode instead"
echo"--no-resume Do not try to resume a failed run. By default, execution is resumed once"
echo"--initialize Create file lists without actually synchronizing anything, this will help setup deletion detections before the first run"
echo""
echo"[QUICKSYNC OPTIONS]"
@ -5327,7 +5501,7 @@ sync_on_changes=false
_NOLOCKS=false
osync_cmd=$0
_SUMMARY=false
INITIALIZE="no"
function GetCommandlineArguments {
localisFirstArgument=true
@ -5425,6 +5599,10 @@ function GetCommandlineArguments {
LOG_CONFLICTS="yes"
opts=$opts" --alert-conflicts"
;;
--initialize)
INITIALIZE="yes"
opts=$opts"--initialize"
;;
--no-prefix)
opts=$opts" --no-prefix"
_LOGGER_PREFIX=""
@ -5496,7 +5674,6 @@ if [ $_QUICK_SYNC -eq 2 ]; then
_Logger "\e[41mLogger function called without proper loglevel [$level].\e[0m""\e[41mLogger function called without proper loglevel [$level].\e[0m" true
Logger "${FUNCNAME[0]} called by [$id] finished monitoring pid [$pid] with exitcode [$retval].""ERROR"
Logger "${FUNCNAME[0]} called by [$id] finished monitoring pid [$pid] with exitcode [$retval].""DEBUG" #TODO: set this to debug in order to stop complaints
if["$functionMode"=="ParallelExec"];then
Logger "Command was [${commandsArrayPid[$pid]}].""ERROR"
_Logger "\e[41mLogger function called without proper loglevel [$level].\e[0m""\e[41mLogger function called without proper loglevel [$level].\e[0m" true
QuickLogger "Cannot copy [$fileName] to [$destPath]. Make sure to run install script in the directory containing all other files."
QuickLogger "Also make sure you have permissions to write to [$BIN_DIR]."
Logger "Cannot copy [$sourcePath/$sourceFileName] to [$destPath/$destFileName]. Make sure to run install script in the directory containing all other files.""SIMPLE"
Logger "Also make sure you have permissions to write to [$BIN_DIR].""SIMPLE"
exit1
else
QuickLogger "Copied [$fileName] to [$destPath]."
Logger "Copied [$sourcePath/$sourceFileName] to [$destPath/$destFileName].""SIMPLE"
if["$fileMod" !=""];then
chmod "$fileMod""$destPath/$fileName"
chmod "$fileMod""$destPath/$destFileName"
if[$? !=0];then
QuickLogger "Cannot set file permissions of [$destPath/$fileName] to [$fileMod]."
Logger "Cannot set file permissions of [$destPath/$destFileName] to [$fileMod].""SIMPLE"
exit1
else
QuickLogger "Set file permissions to [$fileMod] on [$destPath/$fileName]."
Logger "Set file permissions to [$fileMod] on [$destPath/$destFileName].""SIMPLE"
fi
fi
@ -320,12 +513,12 @@ function CopyFile {
userGroup="$userGroup"":$fileGroup"
fi
chown "$userGroup""$destPath/$fileName"
chown "$userGroup""$destPath/$destFileName"
if[$? !=0];then
QuickLogger "Could not set file ownership on [$destPath/$fileName] to [$userGroup]."
Logger "Could not set file ownership on [$destPath/$destFileName] to [$userGroup].""SIMPLE"
exit1
else
QuickLogger "Set file ownership on [$destPath/$fileName] to [$userGroup]."
Logger "Set file ownership on [$destPath/$destFileName] to [$userGroup].""SIMPLE"
# VERBOSE sent to stdout if _LOGGER_VERBOSE = true
# ALWAYS is sent to stdout unless _LOGGER_SILENT = true
# DEBUG & PARANOIA_DEBUG are only sent to stdout if _DEBUG=yes
# SIMPLE is a wrapper for QuickLogger that does not use advanced functionality
function Logger {
localvalue="${1}"# Sentence to log (in double quotes)
locallevel="${2}"# Log level
@ -282,35 +320,18 @@ function Logger {
_Logger "$prefix$value""$prefix$value"
return
fi
elif["$level"=="SIMPLE"];then
if["$_LOGGER_SILENT"==true];then
_Logger "$preix$value"
else
_Logger "$preix$value""$prefix$value"
fi
return
else
_Logger "\e[41mLogger function called without proper loglevel [$level].\e[0m""\e[41mLogger function called without proper loglevel [$level].\e[0m" true
Logger "${FUNCNAME[0]} called by [$id] finished monitoring pid [$pid] with exitcode [$retval].""ERROR"
Logger "${FUNCNAME[0]} called by [$id] finished monitoring pid [$pid] with exitcode [$retval].""DEBUG" #TODO: set this to debug in order to stop complaints
if["$functionMode"=="ParallelExec"];then
Logger "Command was [${commandsArrayPid[$pid]}].""ERROR"
echo"--force-unlock Will override any existing active or dead locks on initiator and target replica"
echo"--on-changes Will launch a sync task after a short wait period if there is some file activity on initiator replica. You should try daemon mode instead"
echo"--no-resume Do not try to resume a failed run. By default, execution is resumed once"
echo"--initialize Create file lists without actually synchronizing anything, this will help setup deletion detections before the first run"
echo""
echo"[QUICKSYNC OPTIONS]"
@ -5106,7 +5278,7 @@ sync_on_changes=false
_NOLOCKS=false
osync_cmd=$0
_SUMMARY=false
INITIALIZE="no"
function GetCommandlineArguments {
localisFirstArgument=true
@ -5204,6 +5376,10 @@ function GetCommandlineArguments {
LOG_CONFLICTS="yes"
opts=$opts" --alert-conflicts"
;;
--initialize)
INITIALIZE="yes"
opts=$opts"--initialize"
;;
--no-prefix)
opts=$opts" --no-prefix"
_LOGGER_PREFIX=""
@ -5261,10 +5437,21 @@ if [ $_QUICK_SYNC -eq 2 ]; then
# VERBOSE sent to stdout if _LOGGER_VERBOSE = true
# ALWAYS is sent to stdout unless _LOGGER_SILENT = true
# DEBUG & PARANOIA_DEBUG are only sent to stdout if _DEBUG=yes
# SIMPLE is a wrapper for QuickLogger that does not use advanced functionality
function Logger {
localvalue="${1}"# Sentence to log (in double quotes)
locallevel="${2}"# Log level
@ -276,35 +312,18 @@ function Logger {
_Logger "$prefix$value""$prefix$value"
return
fi
elif["$level"=="SIMPLE"];then
if["$_LOGGER_SILENT"==true];then
_Logger "$preix$value"
else
_Logger "$preix$value""$prefix$value"
fi
return
else
_Logger "\e[41mLogger function called without proper loglevel [$level].\e[0m""\e[41mLogger function called without proper loglevel [$level].\e[0m" true
Logger "${FUNCNAME[0]} called by [$id] finished monitoring pid [$pid] with exitcode [$retval].""ERROR"
Logger "${FUNCNAME[0]} called by [$id] finished monitoring pid [$pid] with exitcode [$retval].""DEBUG" #TODO: set this to debug in order to stop complaints
if["$functionMode"=="ParallelExec"];then
Logger "Command was [${commandsArrayPid[$pid]}].""ERROR"