From acc604c490931e0de25fd6125c774b1e02af5dc0 Mon Sep 17 00:00:00 2001 From: Ramakrishnan G Date: Wed, 29 Apr 2015 13:38:04 +0000 Subject: [PATCH] Address comments on virtual media device label commit This commit address last comments on I5e8a706989bad13051eb47db0b1e762e6c672318. It adds the date for a comment was added and removes redundant wait period for initialization. Change-Id: Idff38835969c094175f68be78c407ae975473b57 --- .../ramdisk-base/extra-data.d/scripts/d/init-func | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/elements/ramdisk-base/extra-data.d/scripts/d/init-func b/elements/ramdisk-base/extra-data.d/scripts/d/init-func index 0e3df344..752c8aec 100755 --- a/elements/ramdisk-base/extra-data.d/scripts/d/init-func +++ b/elements/ramdisk-base/extra-data.d/scripts/d/init-func @@ -24,15 +24,14 @@ function configure_vmedia_dir() { wait_for 5 1 "ls $VMEDIA_DEVICE_BY_LABEL" if [[ $? != 0 ]]; then - # TODO(rameshg87): This block of code is there only for backward - # compatibility to older versions of Ironic. Remove this after 2 - # releases. Ironic will now assign labels to Virtual Media devices. + # TODO(rameshg87) - 04/29/15 : This block of code is there only + # for backward compatibility to older versions of Ironic. Remove this + # after 2 releases. Ironic will now assign labels to Virtual Media + # devices. SYSFS_DEVICE_MODELS="/sys/class/block/*/device/model" SYSFS_VMEDIA_DEVICE_MODEL="virtual media" - # Wait for some seconds for kernel to finish initializing the - # virtual media devices. - wait_for 5 1 "grep -q -i \"$SYSFS_VMEDIA_DEVICE_MODEL\" $SYSFS_DEVICE_MODELS" + grep -q -i "$SYSFS_VMEDIA_DEVICE_MODEL" $SYSFS_DEVICE_MODELS if [[ $? != 0 ]]; then echo "Error finding the virtual floppy device on the node." troubleshoot