mirror of
https://github.com/deajan/osync
synced 2024-11-05 12:01:02 +00:00
Added small fixes from obackup
This commit is contained in:
parent
2ec41074ae
commit
4c6ada2388
@ -6,7 +6,7 @@ PROGRAM=[prgname]
|
||||
PROGRAM_VERSION=[version]
|
||||
PROGRAM_BINARY=$PROGRAM".sh"
|
||||
PROGRAM_BATCH=$PROGRAM"-batch.sh"
|
||||
SCRIPT_BUILD=2016121301
|
||||
SCRIPT_BUILD=2016122701
|
||||
|
||||
## osync / obackup / pmocr / zsnap install script
|
||||
## Tested on RHEL / CentOS 6 & 7, Fedora 23, Debian 7 & 8, Mint 17 and FreeBSD 8, 10 and 11
|
||||
@ -48,6 +48,8 @@ include #### GetLocalOS SUBSET ####
|
||||
function SetLocalOSSettings {
|
||||
USER=root
|
||||
|
||||
# LOCAL_OS and LOCAL_OS_FULL are global variables set at GetLocalOS
|
||||
|
||||
case $LOCAL_OS in
|
||||
*"BSD"*)
|
||||
GROUP=wheel
|
||||
@ -74,7 +76,7 @@ function SetLocalOSSettings {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OS=$(UrlEncode "$localOsVar")
|
||||
OS=$(UrlEncode "$LOCAL_OS_FULL")
|
||||
}
|
||||
|
||||
function GetInit {
|
||||
|
@ -3,7 +3,7 @@
|
||||
#### OFUNCTIONS MINI SUBSET ####
|
||||
|
||||
_OFUNCTIONS_VERSION=2.1-RC1+dev
|
||||
_OFUNCTIONS_BUILD=2016122303
|
||||
_OFUNCTIONS_BUILD=2016122701
|
||||
#### _OFUNCTIONS_BOOTSTRAP SUBSET ####
|
||||
_OFUNCTIONS_BOOTSTRAP=true
|
||||
#### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
|
||||
@ -150,7 +150,7 @@ function RemoteLogger {
|
||||
local retval="${3:-undef}" # optional return value of command
|
||||
|
||||
if [ "$_LOGGER_PREFIX" == "time" ]; then
|
||||
prefix="RTIME: $SECONDS - "
|
||||
prefix="TIME: $SECONDS - "
|
||||
elif [ "$_LOGGER_PREFIX" == "date" ]; then
|
||||
prefix="R $(date) - "
|
||||
else
|
||||
@ -1098,7 +1098,7 @@ function GetLocalOS {
|
||||
if grep -i Microsoft /proc/sys/kernel/osrelease > /dev/null 2>&1; then
|
||||
localOsVar="Microsoft"
|
||||
else
|
||||
localOsVar="$(uname -spio 2>&1)"
|
||||
localOsVar="$(uname -spior 2>&1)"
|
||||
if [ $? != 0 ]; then
|
||||
localOsVar="$(uname -v 2>&1)"
|
||||
if [ $? != 0 ]; then
|
||||
@ -1148,6 +1148,9 @@ function GetLocalOS {
|
||||
if [ "$_OFUNCTIONS_VERSION" != "" ]; then
|
||||
Logger "Local OS: [$localOsVar]." "DEBUG"
|
||||
fi
|
||||
|
||||
# Add a global variable for statistics in installer
|
||||
LOCAL_OS_FULL="$localOsVar"
|
||||
}
|
||||
#### GetLocalOS SUBSET END ####
|
||||
|
||||
@ -1175,7 +1178,7 @@ function GetOs {
|
||||
if grep -i Microsoft /proc/sys/kernel/osrelease > /dev/null 2>&1; then
|
||||
localOsVar="Microsoft"
|
||||
else
|
||||
localOsVar="$(uname -spio 2>&1)"
|
||||
localOsVar="$(uname -spior 2>&1)"
|
||||
if [ $? != 0 ]; then
|
||||
localOsVar="$(uname -v 2>&1)"
|
||||
if [ $? != 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user