This fix enables the persistance of empty configuration files during firstboot, 
in ovirt_store_config, so configuration files like ssh/ssl keys that are 
dynamically generated (i.e. content is not known until the node has booted at 
least one time) to well known locations can be pre set for persistance.

Signed-off-by: Ricardo Marin Matinata <[email protected]>
---
 scripts/ovirt-functions |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index 482441a..1c3336d 100644
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -495,9 +495,9 @@ ovirt_store_config() {
             fi
 
             if $persist_it; then
-                # skip if file does not exist or is empty
-                if [ ! -s "${filename}" ]; then
-                    printf " Skipping, file '${filename}' does not exist or is 
empty\n"
+                # skip if file does not exist
+                if [ ! -e "${filename}" ]; then
+                    printf " Skipping, file '${filename}' does not exist\n"
                     continue
                 fi
                 # skip if already bind-mounted
-- 
1.6.6.1

_______________________________________________
Ovirt-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/ovirt-devel

Reply via email to