mirror of
https://github.com/deajan/obackup.git
synced 2024-11-15 04:03: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 localOsName
|
||||||
local localOsVer
|
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
|
if ls --help 2>&1 | grep -i "BusyBox" > /dev/null; then
|
||||||
localOsVar="BusyBox"
|
localOsVar="BusyBox"
|
||||||
else
|
else
|
||||||
@ -151,8 +151,8 @@ function GetLocalOS {
|
|||||||
|
|
||||||
# Get linux versions
|
# Get linux versions
|
||||||
if [ -f "/etc/os-release" ]; then
|
if [ -f "/etc/os-release" ]; then
|
||||||
localOsName=$(GetConfFileValue "/etc/os-release" "NAME")
|
localOsName=$(GetConfFileValue "/etc/os-release" "NAME" true)
|
||||||
localOsVer=$(GetConfFileValue "/etc/os-release" "VERSION")
|
localOsVer=$(GetConfFileValue "/etc/os-release" "VERSION" true)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add a global variable for statistics in installer
|
# Add a global variable for statistics in installer
|
||||||
@ -165,6 +165,8 @@ function GetLocalOS {
|
|||||||
function GetConfFileValue () {
|
function GetConfFileValue () {
|
||||||
local file="${1}"
|
local file="${1}"
|
||||||
local name="${2}"
|
local name="${2}"
|
||||||
|
local noError="${3:-false}"
|
||||||
|
|
||||||
local value
|
local value
|
||||||
|
|
||||||
value=$(grep "^$name=" "$file")
|
value=$(grep "^$name=" "$file")
|
||||||
@ -172,10 +174,15 @@ function GetConfFileValue () {
|
|||||||
value="${value##*=}"
|
value="${value##*=}"
|
||||||
echo "$value"
|
echo "$value"
|
||||||
else
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function SetLocalOSSettings {
|
function SetLocalOSSettings {
|
||||||
USER=root
|
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