mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #1112: Move SED initialization to scripts_common.sh. Always fix path for SRC/DST
This commit is contained in:
parent
fb44e1955a
commit
e4017e6106
@ -38,6 +38,12 @@ SUDO=sudo
|
||||
WGET=wget
|
||||
GREP=grep
|
||||
|
||||
if [ "x$(uname -s)" = "xLinux" ]; then
|
||||
SED="$SED -r"
|
||||
else
|
||||
SED="/usr/bin/sed -E"
|
||||
fi
|
||||
|
||||
# Used for log messages
|
||||
SCRIPT_NAME=`basename $0`
|
||||
|
||||
|
@ -33,12 +33,6 @@ ONE_SH=$ONE_LIB/sh
|
||||
|
||||
. $ONE_SH/scripts_common.sh
|
||||
|
||||
if [ "x$(uname -s)" = "xLinux" ]; then
|
||||
SED="$SED -r"
|
||||
else
|
||||
SED="/usr/bin/sed -E"
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Function to get hosts and paths from arguments
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -52,7 +46,8 @@ function arg_host
|
||||
# Gets the path from an argument
|
||||
function arg_path
|
||||
{
|
||||
echo $1 | $SED 's/^[^:]*:(.*)$/\1/'
|
||||
ARG_PATH=`echo $1 | $SED 's/^[^:]*:(.*)$/\1/'`
|
||||
fix_dir_slashes "$ARG_PATH"
|
||||
}
|
||||
|
||||
#Return the DATASTORE_LOCATION from OpenNebula configuration
|
||||
|
Loading…
x
Reference in New Issue
Block a user