[Ovirt-devel] [PATCH] Allow persistance of empty config files in ovirt_store_config v2

Ricardo Marin Matinata matinata at br.ibm.com
Thu Mar 25 17:30:18 UTC 2010


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 <matinata at br.ibm.com>
---
 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




More information about the ovirt-devel mailing list