mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-15 09:13:15 +09:00
bug #4602: simplify if statements
By: EOLE Team
(cherry picked from commit e7054fafe1)
This commit is contained in:
1 parent
e174c0d530
commit
dbb24d3028
2 files changed
+2
-2
No files matched your search
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user