bug #4602: simplify if statements

By: EOLE Team
(cherry picked from commit e7054fafe1)
This commit is contained in:
Javi Fontan committed 2016-07-19 17:43:40 +02:00
1 parent e174c0d530
commit dbb24d3028
2 files changed
+2 -2

No files matched your search

+1 -1
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"
+1 -1
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"