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 <[email protected]> --- 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 <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
