From 4c6ada238874613d978921beb362f6e0b328f5d0 Mon Sep 17 00:00:00 2001 From: deajan Date: Wed, 28 Dec 2016 23:37:07 +0100 Subject: [PATCH] Added small fixes from obackup --- dev/common_install.sh | 6 ++++-- dev/ofunctions.sh | 11 +++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dev/common_install.sh b/dev/common_install.sh index 3d8dd77..d5d024e 100755 --- a/dev/common_install.sh +++ b/dev/common_install.sh @@ -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 { diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index fc35e97..be2287e 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -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