1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-25 23:21:29 +03:00

B #6162: Fix duplicated argument parsing in snap actions

This commit is contained in:
Ruben S. Montero 2023-03-28 09:29:48 +02:00
parent 52156312fc
commit 5a8bec5168
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
3 changed files with 8 additions and 20 deletions

View File

@ -15,10 +15,6 @@
# See the License for the specific language governing permissions and # # See the License for the specific language governing permissions and #
# limitations under the License. # # limitations under the License. #
#--------------------------------------------------------------------------- # #--------------------------------------------------------------------------- #
DRV_ACTION=$1
ID=$2
if [ -z "${ONE_LOCATION}" ]; then if [ -z "${ONE_LOCATION}" ]; then
TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh
DATASTORES=/var/lib/one/datastores DATASTORES=/var/lib/one/datastores

View File

@ -15,14 +15,6 @@
# See the License for the specific language governing permissions and # # See the License for the specific language governing permissions and #
# limitations under the License. # # limitations under the License. #
#--------------------------------------------------------------------------- # #--------------------------------------------------------------------------- #
DRV_ACTION=$1
ID=$2
if [ "${DRV_ACTION}" = "-" ]; then
DRV_ACTION=`cat -`
fi
if [ -z "${ONE_LOCATION}" ]; then if [ -z "${ONE_LOCATION}" ]; then
TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh
else else
@ -39,6 +31,10 @@ source ${DRIVER_PATH}/../libfs.sh
DRV_ACTION=$1 DRV_ACTION=$1
ID=$2 ID=$2
if [ "${DRV_ACTION}" = "-" ]; then
DRV_ACTION=`cat -`
fi
XPATH="${DRIVER_PATH}/../xpath.rb -b $DRV_ACTION" XPATH="${DRIVER_PATH}/../xpath.rb -b $DRV_ACTION"
unset i j XPATH_ELEMENTS unset i j XPATH_ELEMENTS

View File

@ -15,14 +15,6 @@
# See the License for the specific language governing permissions and # # See the License for the specific language governing permissions and #
# limitations under the License. # # limitations under the License. #
#--------------------------------------------------------------------------- # #--------------------------------------------------------------------------- #
DRV_ACTION=$1
ID=$2
if [ "${DRV_ACTION}" = "-" ]; then
DRV_ACTION=`cat -`
fi
if [ -z "${ONE_LOCATION}" ]; then if [ -z "${ONE_LOCATION}" ]; then
TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh
DATASTORES=/var/lib/one/datastores DATASTORES=/var/lib/one/datastores
@ -43,6 +35,10 @@ source ${DRIVER_PATH}/../libfs.sh
DRV_ACTION=$1 DRV_ACTION=$1
ID=$2 ID=$2
if [ "${DRV_ACTION}" = "-" ]; then
DRV_ACTION=`cat -`
fi
XPATH="${DRIVER_PATH}/../xpath.rb -b $DRV_ACTION" XPATH="${DRIVER_PATH}/../xpath.rb -b $DRV_ACTION"
unset i j XPATH_ELEMENTS unset i j XPATH_ELEMENTS