mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
feature #4139: create .monitor file in ssh_make_path
This commit is contained in:
1 parent
3cb5cab021
commit
de891f3fb0
1 file changed
+7
-1
@@ -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=$?
|
||||
|
||||
Reference in new issue
Block a user