mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
feature #4139: create .monitor file in ssh_make_path
This commit is contained in:
parent
3cb5cab021
commit
de891f3fb0
@ -433,12 +433,18 @@ EOF
|
||||
echo "$SSH_EXEC_OUT"
|
||||
}
|
||||
|
||||
#Creates path ($2) at $1
|
||||
# Creates path ($2) at $1. If third parameter is "monitor" creates the
|
||||
# file ".monitor" in the directory. Used for ssh disk monitoring
|
||||
function ssh_make_path
|
||||
{
|
||||
SSH_EXEC_ERR=`$SSH $1 sh -s 2>&1 1>/dev/null <<EOF
|
||||
set -e
|
||||
if [ ! -d $2 ]; then
|
||||
mkdir -p $2
|
||||
|
||||
if [ "monitor" = "$3" ]; then
|
||||
touch "$2/.monitor"
|
||||
fi
|
||||
fi
|
||||
EOF`
|
||||
SSH_EXEC_RC=$?
|
||||
|
Loading…
x
Reference in New Issue
Block a user