[node-patches] Change in ovirt-node[master]: Make sure $live_dev isn't an empty string
rbarry at redhat.com
rbarry at redhat.com
Fri Nov 14 16:37:46 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: Make sure $live_dev isn't an empty string
......................................................................
Make sure $live_dev isn't an empty string
Checking whether an empty string exists as a file appears to
always be true. Check whether it's empty as well, so we don't try
to use empty strings as $live_dev
Change-Id: I9e118e32d716e9e904cd399d3b77dc1b55c9581c
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1163688
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M dracut/ovirt-boot-functions
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/76/35176/1
diff --git a/dracut/ovirt-boot-functions b/dracut/ovirt-boot-functions
index 780c275..26ef702 100644
--- a/dracut/ovirt-boot-functions
+++ b/dracut/ovirt-boot-functions
@@ -25,7 +25,7 @@
# livecd boot disk
get_live_disk() {
local live_dev=$(grep /dev/.initramfs/live /proc/mounts | awk '{print $1}')
- if [ ! -e $live_dev ]; then
+ if [ -z $live_dev ] || [ ! -e $live_dev ]; then
# PXE boot
live_dev=/dev/loop0
live_disk=
--
To view, visit http://gerrit.ovirt.org/35176
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e118e32d716e9e904cd399d3b77dc1b55c9581c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list