mirror of
https://github.com/deajan/obackup.git
synced 2024-12-24 14:33:41 +01:00
Rebuilt targets
This commit is contained in:
parent
c5ad174a0e
commit
f3a9e1d05e
File diff suppressed because it is too large
Load Diff
15
install.sh
15
install.sh
@ -93,7 +93,7 @@ function GetLocalOS {
|
||||
local localOsName
|
||||
local localOsVer
|
||||
|
||||
# There's no good way to tell if currently running in BusyBox shell. Using sluggish way.
|
||||
# There is no good way to tell if currently running in BusyBox shell. Using sluggish way.
|
||||
if ls --help 2>&1 | grep -i "BusyBox" > /dev/null; then
|
||||
localOsVar="BusyBox"
|
||||
else
|
||||
@ -151,8 +151,8 @@ function GetLocalOS {
|
||||
|
||||
# Get linux versions
|
||||
if [ -f "/etc/os-release" ]; then
|
||||
localOsName=$(GetConfFileValue "/etc/os-release" "NAME")
|
||||
localOsVer=$(GetConfFileValue "/etc/os-release" "VERSION")
|
||||
localOsName=$(GetConfFileValue "/etc/os-release" "NAME" true)
|
||||
localOsVer=$(GetConfFileValue "/etc/os-release" "VERSION" true)
|
||||
fi
|
||||
|
||||
# Add a global variable for statistics in installer
|
||||
@ -165,6 +165,8 @@ function GetLocalOS {
|
||||
function GetConfFileValue () {
|
||||
local file="${1}"
|
||||
local name="${2}"
|
||||
local noError="${3:-false}"
|
||||
|
||||
local value
|
||||
|
||||
value=$(grep "^$name=" "$file")
|
||||
@ -172,10 +174,15 @@ function GetConfFileValue () {
|
||||
value="${value##*=}"
|
||||
echo "$value"
|
||||
else
|
||||
Logger "Cannot get value for [$name] in config file [$file]." "ERROR"
|
||||
if [ $noError == true ]; then
|
||||
Logger "Cannot get value for [$name] in config file [$file]." "NOTICE"
|
||||
else
|
||||
Logger "Cannot get value for [$name] in config file [$file]." "ERROR"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function SetLocalOSSettings {
|
||||
USER=root
|
||||
|
||||
|
644
obackup.sh
644
obackup.sh
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user