1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

bug #4602: simplify if statements

By: EOLE Team
This commit is contained in:
Javi Fontan 2016-07-19 17:42:09 +02:00
parent bda3bf4881
commit e7054fafe1
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ source $(dirname $0)/../../scripts_common.sh
DOMAIN=$1
TARGET_DEVICE=$2
if [[ ! -z "$DOMAIN" ]] && [[ ! -z "$TARGET_DEVICE" ]]
if [[ -n "$DOMAIN" ]] && [[ -n "$TARGET_DEVICE" ]]
then
CMD="virsh --connect $LIBVIRT_URI change-media $DOMAIN $TARGET_DEVICE \
--eject --force"

View File

@ -23,7 +23,7 @@ DOMAIN=$1
TARGET_DEVICE=$2
ISO_PATH=$3
if [[ ! -z "$DOMAIN" ]] && [[ ! -z "$TARGET_DEVICE" ]] && [[ ! -z "$ISO_PATH" ]]
if [[ -n "$DOMAIN" ]] && [[ -n "$TARGET_DEVICE" ]] && [[ -n "$ISO_PATH" ]]
then
CMD="virsh --connect $LIBVIRT_URI \
change-media $DOMAIN $TARGET_DEVICE $ISO_PATH --insert"